From 65db75a91de212a7b8776df61eca2931321dccd3 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 23 Aug 2017 16:34:30 -0400 Subject: [PATCH] Fix group profile whitelist check. // FREEBIE --- Signal/src/Profiles/OWSProfileManager.m | 2 +- .../ViewControllers/ConversationView/MessagesViewController.m | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Signal/src/Profiles/OWSProfileManager.m b/Signal/src/Profiles/OWSProfileManager.m index 831543844..5ce59a610 100644 --- a/Signal/src/Profiles/OWSProfileManager.m +++ b/Signal/src/Profiles/OWSProfileManager.m @@ -775,7 +775,7 @@ const NSUInteger kOWSProfileManager_MaxAvatarDiameter = 640; NSString *groupIdKey = [groupId hexadecimalString]; // We just consult the lazy cache, not the db. - if (self.groupProfileWhitelistCache[groupIdKey]) { + if ([self isGroupIdInProfileWhitelist:groupId]) { return; } diff --git a/Signal/src/ViewControllers/ConversationView/MessagesViewController.m b/Signal/src/ViewControllers/ConversationView/MessagesViewController.m index ffe90fd45..de0e3ed89 100644 --- a/Signal/src/ViewControllers/ConversationView/MessagesViewController.m +++ b/Signal/src/ViewControllers/ConversationView/MessagesViewController.m @@ -383,6 +383,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { TSGroupThread *groupThread = (TSGroupThread *)self.thread; if ([groupThread.groupModel.groupId isEqualToData:groupId]) { [self ensureDynamicInteractions]; + [self ensureBannerState]; } } } @@ -825,6 +826,7 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { @"Text for banner in group conversation view that offers to share your profile with this group.") bannerColor:[UIColor ows_reminderDarkYellowColor] tapSelector:@selector(groupProfileWhitelistBannerWasTapped:)]; + return; } }