Keep home view controller in the navigation stack when entering an archived conversation.

This commit is contained in:
Michael Kirk 2018-10-08 07:08:35 -06:00 committed by Matthew Chen
parent f78198c07b
commit ac12169627
1 changed files with 5 additions and 2 deletions

View File

@ -1207,13 +1207,16 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
return;
}
// We do this synchronously if we're already on the main thread.
DispatchMainThreadSafe(^{
ConversationViewController *conversationVC = [ConversationViewController new];
[conversationVC configureForThread:thread action:action focusMessageId:focusMessageId];
self.lastThread = thread;
[self.navigationController setViewControllers:@[ self, conversationVC ] animated:isAnimated];
if (self.homeViewMode == HomeViewMode_Archive) {
[self.navigationController pushViewController:conversationVC animated:isAnimated];
} else {
[self.navigationController setViewControllers:@[ self, conversationVC ] animated:isAnimated];
}
});
}