summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/ThreadViewController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/ViewControllers/ThreadViewController.m')
-rw-r--r--Juick/ViewControllers/ThreadViewController.m12
1 files changed, 7 insertions, 5 deletions
diff --git a/Juick/ViewControllers/ThreadViewController.m b/Juick/ViewControllers/ThreadViewController.m
index 2b0d3c4..95c9839 100644
--- a/Juick/ViewControllers/ThreadViewController.m
+++ b/Juick/ViewControllers/ThreadViewController.m
@@ -53,15 +53,17 @@
-(void) updateQuoteText:(Message *)message {
MessageInputView *inputView = (MessageInputView *)self.inputAccessoryView;
inputView.quoteText.text = message.text;
- [inputView.contentView setNeedsUpdateConstraints];
- [inputView.contentView updateConstraintsIfNeeded];
- [inputView.contentView setNeedsLayout];
- [inputView.contentView layoutIfNeeded];
+ [inputView.textContent becomeFirstResponder];
}
-(void) sendReply {
MessageInputView *inputView = (MessageInputView *)self.inputAccessoryView;
Message *msg = [self.messages firstObject];
- [[APIClient sharedClient] postReplyToThread:msg.mid inReplyTo:self.replyTo text:inputView.textContent.text];
+ [[APIClient sharedClient] postReplyToThread:msg.mid inReplyTo:self.replyTo text:inputView.textContent.text result:^(Message *msg, NSError *err) {
+ MessageInputView *inputView = (MessageInputView *)self.inputAccessoryView;
+ inputView.quoteText.text = @"";
+ [inputView.textContent endEditing:YES];
+ [self refreshData];
+ }];
}
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {