diff --git a/Signal/src/environment/VersionMigrations.m b/Signal/src/environment/VersionMigrations.m index b20ee3b37..225dc23f5 100644 --- a/Signal/src/environment/VersionMigrations.m +++ b/Signal/src/environment/VersionMigrations.m @@ -101,7 +101,6 @@ } } - +(BOOL)wasRedPhoneRegistered{ BOOL hasLocalNumber = [UICKeyChainStore stringForKey:LOCAL_NUMBER_KEY]!=nil; BOOL hasPassKey = [UICKeyChainStore stringForKey:SAVED_PASSWORD_KEY]!=nil; @@ -113,7 +112,7 @@ BOOL registered = [[NSUserDefaults.standardUserDefaults objectForKey:@"isRegistered"] boolValue]; return registered && hasLocalNumber && hasPassKey && hasSignaling - && hasCipherKey && hasCipherKey && hasZIDKey && hasSignalingExtra; + && hasCipherKey && hasZIDKey && hasSignalingExtra; } + (void)migrateKeyingStorageToVersion2Dot0{ diff --git a/Signal/src/view controllers/MessagesViewController.m b/Signal/src/view controllers/MessagesViewController.m index ef7eb2655..b8f9ce0fa 100644 --- a/Signal/src/view controllers/MessagesViewController.m +++ b/Signal/src/view controllers/MessagesViewController.m @@ -355,9 +355,11 @@ typedef enum : NSUInteger { self.navController = (APNavigationController*)self.navigationController; - if(!isGroupConversation) { + if([self canCall]) { self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"btnPhone--white"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(callAction)]; self.navigationItem.rightBarButtonItem.imageInsets = UIEdgeInsetsMake(0, -10, 0, 10); + } else if(!_thread.isGroupThread) { + self.navigationItem.rightBarButtonItem = nil; } [self hideInputIfNeeded];