diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index 81d223bfd..f9b5b64d7 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -88,7 +88,6 @@ 34E3EF0D1EFC235B007F6822 /* DebugUIDiskUsage.m in Sources */ = {isa = PBXBuildFile; fileRef = 34E3EF0C1EFC235B007F6822 /* DebugUIDiskUsage.m */; }; 34E3EF101EFC2684007F6822 /* DebugUIPage.m in Sources */ = {isa = PBXBuildFile; fileRef = 34E3EF0F1EFC2684007F6822 /* DebugUIPage.m */; }; 34E8BF381EE9E2FD00F5F4CA /* FingerprintViewScanController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34E8BF371EE9E2FD00F5F4CA /* FingerprintViewScanController.m */; }; - 34E8BF3B1EEB208E00F5F4CA /* DebugUIVerification.m in Sources */ = {isa = PBXBuildFile; fileRef = 34E8BF3A1EEB208E00F5F4CA /* DebugUIVerification.m */; }; 34F3089C1ECA4CDB00BB7697 /* TSUnreadIndicatorInteraction.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F3089B1ECA4CDB00BB7697 /* TSUnreadIndicatorInteraction.m */; }; 34F3089F1ECA580B00BB7697 /* OWSUnreadIndicatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F3089E1ECA580B00BB7697 /* OWSUnreadIndicatorCell.m */; }; 34F308A21ECB469700BB7697 /* OWSBezierPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F308A11ECB469700BB7697 /* OWSBezierPathView.m */; }; @@ -521,8 +520,6 @@ 34E3EF0F1EFC2684007F6822 /* DebugUIPage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DebugUIPage.m; sourceTree = ""; }; 34E8BF361EE9E2FD00F5F4CA /* FingerprintViewScanController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FingerprintViewScanController.h; sourceTree = ""; }; 34E8BF371EE9E2FD00F5F4CA /* FingerprintViewScanController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FingerprintViewScanController.m; sourceTree = ""; }; - 34E8BF391EEB208E00F5F4CA /* DebugUIVerification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugUIVerification.h; sourceTree = ""; }; - 34E8BF3A1EEB208E00F5F4CA /* DebugUIVerification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DebugUIVerification.m; sourceTree = ""; }; 34F3089A1ECA4CDB00BB7697 /* TSUnreadIndicatorInteraction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSUnreadIndicatorInteraction.h; sourceTree = ""; }; 34F3089B1ECA4CDB00BB7697 /* TSUnreadIndicatorInteraction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSUnreadIndicatorInteraction.m; sourceTree = ""; }; 34F3089D1ECA580B00BB7697 /* OWSUnreadIndicatorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = OWSUnreadIndicatorCell.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; @@ -1070,8 +1067,6 @@ 452037D01EE84975004E4CDF /* DebugUISessionState.m */, 34D8C0251ED3673300188D7C /* DebugUITableViewController.h */, 34D8C0261ED3673300188D7C /* DebugUITableViewController.m */, - 34E8BF391EEB208E00F5F4CA /* DebugUIVerification.h */, - 34E8BF3A1EEB208E00F5F4CA /* DebugUIVerification.m */, ); path = DebugUI; sourceTree = ""; @@ -2149,7 +2144,6 @@ 34F308A21ECB469700BB7697 /* OWSBezierPathView.m in Sources */, 348F2EAE1F0D21BC00D4ECE0 /* DeviceSleepManager.swift in Sources */, 34E3EF101EFC2684007F6822 /* DebugUIPage.m in Sources */, - 34E8BF3B1EEB208E00F5F4CA /* DebugUIVerification.m in Sources */, 76EB058A18170B33006006FC /* Release.m in Sources */, 45D231771DC7E8F10034FA89 /* SessionResetJob.swift in Sources */, 450873C71D9D867B006B54F2 /* OWSIncomingMessageCollectionViewCell.m in Sources */, diff --git a/Signal/src/ViewControllers/DebugUI/DebugUITableViewController.m b/Signal/src/ViewControllers/DebugUI/DebugUITableViewController.m index d0af33ae1..f033fdd4c 100644 --- a/Signal/src/ViewControllers/DebugUI/DebugUITableViewController.m +++ b/Signal/src/ViewControllers/DebugUI/DebugUITableViewController.m @@ -7,7 +7,6 @@ #import "DebugUIDiskUsage.h" #import "DebugUIMessages.h" #import "DebugUISessionState.h" -#import "DebugUIVerification.h" #import "Signal-Swift.h" #import #import @@ -92,8 +91,6 @@ NS_ASSUME_NONNULL_BEGIN if ([thread isKindOfClass:[TSContactThread class]]) { [subsectionItems addObject:[self itemForSubsection:[DebugUISessionState new] viewController:viewController thread:thread]]; - [subsectionItems - addObject:[self itemForSubsection:[DebugUIVerification new] viewController:viewController thread:thread]]; } [contents addSection:[OWSTableSection sectionWithTitle:@"Sections" items:subsectionItems]]; diff --git a/Signal/src/ViewControllers/DebugUI/DebugUIVerification.h b/Signal/src/ViewControllers/DebugUI/DebugUIVerification.h deleted file mode 100644 index 3af2c99f1..000000000 --- a/Signal/src/ViewControllers/DebugUI/DebugUIVerification.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Copyright (c) 2017 Open Whisper Systems. All rights reserved. -// - -#import "DebugUIPage.h" - -NS_ASSUME_NONNULL_BEGIN - -@class TSContactThread; - -@interface DebugUIVerification : DebugUIPage - -@end - -NS_ASSUME_NONNULL_END diff --git a/Signal/src/ViewControllers/DebugUI/DebugUIVerification.m b/Signal/src/ViewControllers/DebugUI/DebugUIVerification.m deleted file mode 100644 index b3cbb2785..000000000 --- a/Signal/src/ViewControllers/DebugUI/DebugUIVerification.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) 2017 Open Whisper Systems. All rights reserved. -// - -#import "DebugUIVerification.h" -#import "DebugUIMessages.h" -#import "OWSTableViewController.h" -#import "Signal-Swift.h" -#import - -NS_ASSUME_NONNULL_BEGIN - -@implementation DebugUIVerification - -#pragma mark - Logging - -+ (NSString *)tag -{ - return [NSString stringWithFormat:@"[%@]", self.class]; -} - -- (NSString *)tag -{ - return self.class.tag; -} - -#pragma mark - Factory Methods - -- (NSString *)name -{ - return @"Verification"; -} - -- (nullable OWSTableSection *)sectionForThread:(nullable TSThread *)threadParameter -{ - OWSAssert([threadParameter isKindOfClass:[TSContactThread class]]); - - TSContactThread *thread = (TSContactThread *)threadParameter; - - NSString *recipientId = thread.contactIdentifier; - OWSAssert(recipientId.length > 0); - - return [OWSTableSection - sectionWithTitle:self.name - items:@[ - [OWSTableItem itemWithTitle:@"Default" - actionBlock:^{ - [DebugUIVerification setVerificationState:OWSVerificationStateDefault - recipientId:recipientId]; - }], - [OWSTableItem itemWithTitle:@"Verified" - actionBlock:^{ - [DebugUIVerification setVerificationState:OWSVerificationStateVerified - recipientId:recipientId]; - }], - [OWSTableItem itemWithTitle:@"No Longer Verified" - actionBlock:^{ - [DebugUIVerification - setVerificationState:OWSVerificationStateNoLongerVerified - recipientId:recipientId]; - }], - ]]; -} - -+ (void)setVerificationState:(OWSVerificationState)verificationState recipientId:(NSString *)recipientId -{ - OWSAssert(recipientId.length > 0); - - OWSRecipientIdentity *_Nullable recipientIdentity = - [[OWSIdentityManager sharedManager] recipientIdentityForRecipientId:recipientId]; - OWSAssert(recipientIdentity); - // By capturing the identity key when we enter these views, we prevent the edge case - // where the user verifies a key that we learned about while this view was open. - NSData *identityKey = recipientIdentity.identityKey; - OWSAssert(identityKey.length > 0); - - [OWSIdentityManager.sharedManager setVerificationState:verificationState - identityKey:identityKey - recipientId:recipientId - isUserInitiatedChange:verificationState != OWSVerificationStateNoLongerVerified]; -} - -@end - -NS_ASSUME_NONNULL_END