Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions Classes/Stacks/Desk/HSDeskGear.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ - (void)createNewTicket:(HSNewTicket *)newTicket byUser:(HSUser *)user success:(
NSDictionary* responsedata = (NSDictionary*)responseObject;

NSString* subject = [responsedata objectForKey:@"subject"];
NSString* ticketId = [responsedata objectForKey:@"id"];
NSString* caseLink = [[[responsedata objectForKey:@"_links"] objectForKey:@"self"] objectForKey:@"href"];

//report success
HSDeskCase* deskCase = [[HSDeskCase alloc] init];
deskCase.subject = subject;
deskCase.apiHref = caseLink;
deskCase.ticketID = ticketId;

if (newTicket.attachments && [newTicket.attachments count] > 0) {

Expand Down
12 changes: 12 additions & 0 deletions Classes/UI/HSIssueDetailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ @interface HSIssueDetailViewController ()<HSEditImageViewControllerDelegate> {

@property UIImagePickerController *imagePickerViewController;
@property HSEditImageViewController *editImageViewController;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *messageViewBottomLayoutConstraint;

@end

Expand Down Expand Up @@ -135,6 +136,7 @@ - (void)addMessageView {
}

self.messageText.returnKeyType = UIReturnKeyGo;
self.messageText.enablesReturnKeyAutomatically = YES;
self.messageText.font = [UIFont systemFontOfSize:14.0f];
self.messageText.delegate = self;
self.messageText.internalTextView.scrollIndicatorInsets = UIEdgeInsetsMake(5, 0, 5, 0);
Expand Down Expand Up @@ -203,6 +205,10 @@ -(void)growingTextViewDidEndEditing:(HSGrowingTextView *)growingTextView{
}
}

-(BOOL)growingTextViewShouldReturn:(HSGrowingTextView *)growingTextView {
[self sendReply:nil];
}

-(void)removeInsetsOnChatTable{
UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0, 0.0, 0 , 0.0);
self.chatTableView.contentInset = contentInsets;
Expand Down Expand Up @@ -417,6 +423,9 @@ -(void) keyboardWillHide:(NSNotification *)note{
CGRect keyboardBounds;
[[note.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] getValue: &keyboardBounds];

//Move the message view to the bottom of the screen along with the keyboard
self.messageViewBottomLayoutConstraint.constant = 0;

// Need to translate the bounds to account for rotation.
keyboardBounds = [self.view convertRect:keyboardBounds toView:nil];

Expand Down Expand Up @@ -457,6 +466,9 @@ - (void)keyboardFrameWillChange: (NSNotification *)notification {
if (UIDeviceOrientationIsPortrait([UIDevice currentDevice].orientation))
{
containerFrame.origin.y = kKeyBoardFrame.origin.y - containerFrame.size.height - 64;

//Move the message view up by Keyboard's height
self.messageViewBottomLayoutConstraint.constant = kKeyBoardFrame.size.height;
}
else {
// On ios 7 landscape x == ios 8 landscape y
Expand Down
Loading