summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/MessagesViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-10-01 17:29:46 +0300
committerGravatar Vitaly Takmazov2019-10-01 22:14:59 +0300
commitdbab6ab54c40a016f75e75a4143576c3fa41c3e0 (patch)
tree6fd5e68ec76c249fcaa07219c53ccab2f4c98fd5 /Juick/ViewControllers/MessagesViewController.m
parentaeb513ed5c165e355c9c378efde7445f597d0380 (diff)
Drop AFNetworking and SSKeychain
Diffstat (limited to 'Juick/ViewControllers/MessagesViewController.m')
-rw-r--r--Juick/ViewControllers/MessagesViewController.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m
index afa0f9a..ad28484 100644
--- a/Juick/ViewControllers/MessagesViewController.m
+++ b/Juick/ViewControllers/MessagesViewController.m
@@ -106,6 +106,7 @@ NSString* const messageCellIdentifier = @"messageCell";
self.refreshControl = [UIRefreshControl new];
[self.refreshControl addTarget:self action:@selector(refreshData) forControlEvents:UIControlEventValueChanged];
[self refreshData];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(newMessage:) name:NewMessageNotificationName object:nil];
}
- (void) composePressed {
@@ -174,4 +175,9 @@ NSString* const messageCellIdentifier = @"messageCell";
[self.navigationController pushViewController:threadVC animated:YES];
}
+-(void) newMessage:(NSNotification *)obj {
+ Message *msg = (Message *)[obj object];
+ [self viewThreadForMessage:msg mid:msg.mid scrollTo:0];
+}
+
@end