Merge branch 'mkirk/fix-stutter'

pull/1/head
Michael Kirk 8 years ago
commit 9dd99123f4

@ -474,6 +474,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
[self createScrollButtons]; [self createScrollButtons];
[self createHeaderViews]; [self createHeaderViews];
[self createBackButton];
[self addNotificationListeners]; [self addNotificationListeners];
} }
@ -964,13 +965,13 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
- (void)viewDidAppear:(BOOL)animated - (void)viewDidAppear:(BOOL)animated
{ {
[super viewDidAppear:animated]; [super viewDidAppear:animated];
[self dismissKeyBoard];
[self startReadTimer];
[ProfileFetcherJob runWithThread:self.thread networkManager:self.networkManager];
[self markVisibleMessagesAsRead];
[self startReadTimer];
[self updateNavigationBarSubtitleLabel];
[self updateBackButtonUnreadCount]; [self updateBackButtonUnreadCount];
[self.inputToolbar endEditing:YES];
if (_composeOnOpen && !self.inputToolbar.hidden) { if (_composeOnOpen && !self.inputToolbar.hidden) {
[self popKeyBoard]; [self popKeyBoard];
_composeOnOpen = NO; _composeOnOpen = NO;
@ -979,11 +980,10 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
[self callAction]; [self callAction];
_callOnOpen = NO; _callOnOpen = NO;
} }
[self updateNavigationBarSubtitleLabel];
[ProfileFetcherJob runWithThread:self.thread networkManager:self.networkManager];
[self markVisibleMessagesAsRead];
if (!self.viewHasEverAppeared) {
[self.inputToolbar endEditing:YES];
}
self.viewHasEverAppeared = YES; self.viewHasEverAppeared = YES;
} }
@ -1099,8 +1099,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
return 16; return 16;
} }
- (void)setBarButtonItemsForDisappearingMessagesConfiguration: - (void)createBackButton
(OWSDisappearingMessagesConfiguration *)disappearingMessagesConfiguration
{ {
UIBarButtonItem *backItem = [self createOWSBackButton]; UIBarButtonItem *backItem = [self createOWSBackButton];
// This method gets called multiple times, so it's important we re-layout the unread badge // This method gets called multiple times, so it's important we re-layout the unread badge
@ -1126,7 +1125,11 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
[self updateBackButtonUnreadCount]; [self updateBackButtonUnreadCount];
self.navigationItem.leftBarButtonItem = backItem; self.navigationItem.leftBarButtonItem = backItem;
}
- (void)setBarButtonItemsForDisappearingMessagesConfiguration:
(OWSDisappearingMessagesConfiguration *)disappearingMessagesConfiguration
{
// We want to leave space for the "back" button, the "timer" button, and the "call" // We want to leave space for the "back" button, the "timer" button, and the "call"
// button, and all of the whitespace around these views. There // button, and all of the whitespace around these views. There
// isn't a convenient way to calculate these in a navigation bar, so we just leave // isn't a convenient way to calculate these in a navigation bar, so we just leave

Loading…
Cancel
Save