Fix crash

pull/280/head
nielsandriesse 4 years ago
parent 731f303a92
commit 81b019c94f

@ -649,11 +649,13 @@ const CGFloat kIconViewLength = 24;
// Group settings section.
__block BOOL isUserMember;
NSString *userPublicKey = OWSIdentityManager.sharedManager.identityKeyPair.hexEncodedPublicKey;
[LKStorage readWithBlock:^(YapDatabaseReadTransaction *transaction) {
isUserMember = [(TSGroupThread *)self.thread isUserMemberInGroup:userPublicKey transaction:transaction];
}];
__block BOOL isUserMember = NO;
if (self.isGroupThread) {
NSString *userPublicKey = OWSIdentityManager.sharedManager.identityKeyPair.hexEncodedPublicKey;
[LKStorage readWithBlock:^(YapDatabaseReadTransaction *transaction) {
isUserMember = [(TSGroupThread *)self.thread isUserMemberInGroup:userPublicKey transaction:transaction];
}];
}
if (self.isGroupThread && self.isPrivateGroupChat && isUserMember) {
if (((TSGroupThread *)self.thread).usesSharedSenderKeys) {

Loading…
Cancel
Save