summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-12-07 00:18:52 +0300
committerGravatar Vitaly Takmazov2017-12-07 00:18:52 +0300
commitd856b364dea82f7b89e2040075ee32d988707edb (patch)
tree963308593b095cc069845300f0ed0b59dd7c5e39 /Juick/ViewControllers
parent48234265991dd8ba8e26bd1fa7ea296a9f192ce9 (diff)
refactor
Diffstat (limited to 'Juick/ViewControllers')
-rw-r--r--Juick/ViewControllers/MessagesViewController.m4
-rw-r--r--Juick/ViewControllers/ThreadViewController.m1
2 files changed, 3 insertions, 2 deletions
diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m
index 71f4271..80e8c73 100644
--- a/Juick/ViewControllers/MessagesViewController.m
+++ b/Juick/ViewControllers/MessagesViewController.m
@@ -29,8 +29,8 @@
NSArray *newMsgs = next;
NSUInteger oldCount = [self.messages count];
if ([self.path isEqualToString:[APIClient threadUrl]]) {
- NSUInteger lastRid = [((Message *)[self.messages lastObject]).rid unsignedIntegerValue];
- NSUInteger count = [next count] - 1;
+ NSUInteger lastRid = [((Message *)[self.messages lastObject]).rid unsignedIntegerValue] + 1;
+ NSUInteger count = [next count];
if (oldCount > 0) {
if (lastRid && lastRid < count) {
newMsgs = [next subarrayWithRange:NSMakeRange(lastRid, count - lastRid)];
diff --git a/Juick/ViewControllers/ThreadViewController.m b/Juick/ViewControllers/ThreadViewController.m
index 95c9839..06cbf9a 100644
--- a/Juick/ViewControllers/ThreadViewController.m
+++ b/Juick/ViewControllers/ThreadViewController.m
@@ -61,6 +61,7 @@
[[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.text = @"";
[inputView.textContent endEditing:YES];
[self refreshData];
}];