Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Classes/Core/HSHelpStack.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,16 @@ - (void)showHelp:(UIViewController*)parentController completion:(void (^)(void))

UIViewController* mainController;
if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
UIStoryboard* helpStoryboard = [UIStoryboard storyboardWithName:@"HelpStackStoryboard-iPad" bundle:[NSBundle mainBundle]];
UIStoryboard* helpStoryboard = [UIStoryboard storyboardWithName:@"HelpStackStoryboard-iPad"
bundle:[NSBundle bundleForClass:[self class]]];
mainController = [helpStoryboard instantiateInitialViewController];
[mainController setModalPresentationStyle:UIModalPresentationFormSheet];
[parentController presentViewController:mainController animated:YES completion:completion];

}
else {
UIStoryboard* helpStoryboard = [UIStoryboard storyboardWithName:@"HelpStackStoryboard" bundle:[NSBundle mainBundle]];
UIStoryboard* helpStoryboard = [UIStoryboard storyboardWithName:@"HelpStackStoryboard"
bundle:[NSBundle bundleForClass:[self class]]];
mainController = [helpStoryboard instantiateInitialViewController];
[parentController presentViewController:mainController animated:YES completion:completion];
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/UI/HSGrowingTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ - (void)textViewDidChange:(UITextView *)textView
- (void)refreshHeight
{
//size of content, so we can set the frame of self
NSInteger newSizeH = [self measureHeight];
NSInteger newSizeH = ceilf([self measureHeight]);
if (newSizeH < minHeight || !internalTextView.hasText) {
newSizeH = minHeight; //not smalles than minHeight
}
Expand Down
20 changes: 18 additions & 2 deletions Classes/UI/HSIssueDetailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ @interface HSIssueDetailViewController ()<HSEditImageViewControllerDelegate> {
@property (nonatomic, strong) NSMutableArray *attachments;
@property (nonatomic, strong) NSString *enteredMsg;
@property (nonatomic) CGRect messageFrame;
@property (nonatomic, strong) UIRefreshControl *refreshControl;

@property UIStatusBarStyle currentStatusBarStyle;

@property UIImagePickerController *imagePickerViewController;
Expand Down Expand Up @@ -71,6 +73,19 @@ - (void)viewDidLoad
self.currentStatusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
self.navigationItem.title = self.selectedTicket.subject;

/**
Adding UIRefreshControl to refresh the chat
*/

self.refreshControl = [[UIRefreshControl alloc]init];
[self.refreshControl addTarget:self action:@selector(getTicketUpdates) forControlEvents:UIControlEventValueChanged];

if (@available(iOS 10.0, *)) {
self.chatTableView.refreshControl = self.refreshControl;
} else {
[self.chatTableView addSubview: self.refreshControl];
}

/**
Single tapping anywhere on the chat table view to hide the keyboard
*/
Expand Down Expand Up @@ -136,7 +151,6 @@ - (void)addMessageView {

self.messageText.returnKeyType = UIReturnKeyGo;
self.messageText.font = [UIFont systemFontOfSize:14.0f];
self.messageText.delegate = self;
self.messageText.internalTextView.scrollIndicatorInsets = UIEdgeInsetsMake(5, 0, 5, 0);

self.messageText.textColor = [UIColor darkGrayColor];
Expand All @@ -153,7 +167,7 @@ - (void)addMessageView {
// [self.messageTextSuperView addSubview:self.messageText];
[self.messageText removeFromSuperview];
[self.bottomMessageView addSubview:self.messageText];

self.messageText.delegate = self;
self.sendButton.titleLabel.textColor = [UIColor darkGrayColor];
}

Expand Down Expand Up @@ -506,13 +520,15 @@ - (void)keyboardFrameWillChange: (NSNotification *)notification {
-(void)getTicketUpdates{

[self.ticketSource prepareUpdate:self.selectedTicket success:^{
[self.refreshControl endRefreshing];
self.bottomMessageView.hidden = NO;
[self addMessageView];
[self.loadingIndicator stopAnimating];
self.loadingIndicator.hidden = YES;
[self.chatTableView reloadData];
[self scrollDownToLastMessage:NO];
} failure:^(NSError* e){
[self.refreshControl endRefreshing];
self.bottomMessageView.hidden = NO;
[self.loadingIndicator stopAnimating];
self.loadingIndicator.hidden = YES;
Expand Down
6 changes: 6 additions & 0 deletions Classes/UI/HSMainListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

}

- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
scrollView.scrollEnabled = true;
}



#pragma mark - TableView Delegate methods

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
Expand Down
4 changes: 2 additions & 2 deletions HelpStack.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

Pod::Spec.new do |s|
s.name = "HelpStack"
s.version = "1.1.1"
s.version = "1.1.2"
s.summary = "In-app customer support framework"
s.description = 'See helpstack.io for more details'
s.homepage = "https://github.com/happyfoxinc/helpstack"
s.social_media_url = "https://twitter.com/helpstacksdk"
s.license = 'MIT'
s.author = { "HappyFox" => "ios@happyfox.com" }
s.platform = :ios, '7.0'
s.source = { :git => "https://github.com/happyfoxinc/helpstack.git", :tag => "1.1.1", :submodules => true }
s.source = { :git => "https://github.com/happyfoxinc/helpstack.git", :tag => "1.1.2", :submodules => true }
s.resources = ['Resources/*.png','Resources/*.storyboard']
s.dependency 'AFNetworking', '~> 2.0'
s.frameworks = 'UIKit', 'CoreGraphics'
Expand Down
Loading