Reset compose view on thread switch (#1187)

* all Signal users can send text messages, never hide texting toolbar.

//FREEBIE

* Fix composition box size when switching threads.

Partial revert of 2c83046ff6 which
introduced a shared reusable message view controller across threads.

2c83046ff6 resulted in several discovered
bugs so far (#1179, #1150, #1152, and maybe: #1146). It's pretty clear
at this point we're going against the grain of how
JSQMesageViewController is intended to be used, and since the nominal
purpose of this feature (iPad Layout) doesn't exist, we should revert to
the known good way of interacting with the MessageViewController,
creating a fresh instance per thread.

// FREEBIE
pull/1/head
Michael Kirk 9 years ago
parent da6597118a
commit 9bacc3de78

@ -139,10 +139,9 @@ typedef enum : NSUInteger {
if ([_thread isKindOfClass:[TSGroupThread class]] &&
![((TSGroupThread *)_thread).groupModel.groupMemberIds containsObject:[TSAccountManager localNumber]]) {
[self inputToolbar].hidden = YES; // user has requested they leave the group. further sends disallowed
self.navigationItem.rightBarButtonItem = nil; // further group action disallowed
} else if (![self isTextSecureReachable]) {
[self inputToolbar].hidden = YES; // only RedPhone
} else {
[self inputToolbar].hidden = NO;
[self loadDraftInCompose];

@ -324,10 +324,8 @@ static NSString *const kShowSignupFlowSegue = @"showSignupFlow";
- (void)presentThread:(TSThread *)thread keyboardOnViewAppearing:(BOOL)keyboardOnViewAppearing {
dispatch_async(dispatch_get_main_queue(), ^{
if (!_mvc) {
_mvc = [[UIStoryboard storyboardWithName:@"Storyboard" bundle:NULL]
instantiateViewControllerWithIdentifier:@"MessagesViewController"];
}
_mvc = [[UIStoryboard storyboardWithName:@"Storyboard" bundle:NULL]
instantiateViewControllerWithIdentifier:@"MessagesViewController"];
if (self.presentedViewController) {
[self.presentedViewController dismissViewControllerAnimated:YES completion:nil];

Loading…
Cancel
Save