From 88d9ef987f613bf30c1b9963c427525e2cc32632 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Tue, 15 Nov 2016 12:51:55 -0500 Subject: [PATCH] Share dialog for Safety Numbers // FREEBIE --- Signal.xcodeproj/project.pbxproj | 8 +- Signal/Signal-Info.plist | 2 +- Signal/src/AppDelegate.m | 26 +------ Signal/src/Storyboard/Main.storyboard | 17 ++++- Signal/src/util/UIUtil.h | 3 + Signal/src/util/UIUtil.m | 34 +++++++++ .../FingerprintViewController.m | 70 ++++++++++++++++-- ...SConversationSettingsTableViewController.m | 8 ++ ...leLabel.swift => HighlightableLabel.swift} | 32 +++----- .../translations/ar.lproj/Localizable.strings | Bin 63130 -> 63412 bytes .../az_AZ.lproj/Localizable.strings | Bin 63478 -> 64106 bytes .../translations/bg.lproj/Localizable.strings | Bin 65724 -> 66006 bytes .../translations/bs.lproj/Localizable.strings | Bin 64944 -> 65226 bytes .../translations/ca.lproj/Localizable.strings | Bin 65676 -> 65958 bytes .../translations/cs.lproj/Localizable.strings | Bin 63320 -> 63602 bytes .../translations/da.lproj/Localizable.strings | Bin 64090 -> 64372 bytes .../translations/de.lproj/Localizable.strings | Bin 68120 -> 68402 bytes .../el_GR.lproj/Localizable.strings | Bin 65804 -> 66086 bytes .../translations/en.lproj/Localizable.strings | Bin 63284 -> 63566 bytes .../translations/es.lproj/Localizable.strings | Bin 66326 -> 66608 bytes .../translations/fa.lproj/Localizable.strings | Bin 65366 -> 65648 bytes .../translations/fi.lproj/Localizable.strings | Bin 66202 -> 66484 bytes .../fil.lproj/Localizable.strings | Bin 63376 -> 63658 bytes .../translations/fr.lproj/Localizable.strings | Bin 66114 -> 66396 bytes .../translations/gl.lproj/Localizable.strings | Bin 64382 -> 64664 bytes .../translations/he.lproj/Localizable.strings | Bin 61234 -> 61516 bytes .../translations/hr.lproj/Localizable.strings | Bin 63540 -> 65338 bytes .../translations/hu.lproj/Localizable.strings | Bin 65428 -> 65710 bytes .../translations/id.lproj/Localizable.strings | Bin 64532 -> 64814 bytes .../it_IT.lproj/Localizable.strings | Bin 65750 -> 66032 bytes .../ja_JP.lproj/Localizable.strings | Bin 54336 -> 54618 bytes .../ko_KR.lproj/Localizable.strings | Bin 59880 -> 60162 bytes .../translations/lv.lproj/Localizable.strings | Bin 64502 -> 64784 bytes .../translations/mk.lproj/Localizable.strings | Bin 65716 -> 65998 bytes .../nb_NO.lproj/Localizable.strings | Bin 64004 -> 64286 bytes .../translations/nl.lproj/Localizable.strings | Bin 65492 -> 65774 bytes .../translations/pl.lproj/Localizable.strings | Bin 64438 -> 64720 bytes .../pt_BR.lproj/Localizable.strings | Bin 65460 -> 65742 bytes .../pt_PT.lproj/Localizable.strings | Bin 64780 -> 65190 bytes .../translations/ro.lproj/Localizable.strings | Bin 66150 -> 66502 bytes .../translations/ru.lproj/Localizable.strings | Bin 65052 -> 65382 bytes .../translations/sl.lproj/Localizable.strings | Bin 65484 -> 65766 bytes .../translations/sn.lproj/Localizable.strings | Bin 64972 -> 65254 bytes .../translations/sq.lproj/Localizable.strings | Bin 64838 -> 65120 bytes .../sv_SE.lproj/Localizable.strings | Bin 64242 -> 64504 bytes .../th_TH.lproj/Localizable.strings | Bin 62508 -> 62790 bytes .../tr_TR.lproj/Localizable.strings | Bin 63536 -> 63818 bytes .../zh_CN.lproj/Localizable.strings | Bin 53842 -> 53788 bytes 48 files changed, 142 insertions(+), 58 deletions(-) rename Signal/src/views/{CopyableLabel.swift => HighlightableLabel.swift} (65%) diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index fc6e8e6d5..b381f3a12 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -46,7 +46,7 @@ 458E383A1D6699FA0094BD24 /* OWSDeviceProvisioningURLParserTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 458E38391D6699FA0094BD24 /* OWSDeviceProvisioningURLParserTest.m */; }; 459311FC1D75C948008DD4F0 /* OWSDeviceTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 459311FB1D75C948008DD4F0 /* OWSDeviceTableViewCell.m */; }; 459C3F0D1C9B3A1B003ACF51 /* TSMessageAdapterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 459C3F0C1C9B3A1B003ACF51 /* TSMessageAdapterTest.m */; }; - 45B201761DAECBFE00C461E0 /* CopyableLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45B201751DAECBFE00C461E0 /* CopyableLabel.swift */; }; + 45B201761DAECBFE00C461E0 /* HighlightableLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45B201751DAECBFE00C461E0 /* HighlightableLabel.swift */; }; 45BFFFA81D898AF0004A12A7 /* OWSStaleNotificationObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 45BFFFA71D898AF0004A12A7 /* OWSStaleNotificationObserver.m */; }; 45BFFFA91D898AF0004A12A7 /* OWSStaleNotificationObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 45BFFFA71D898AF0004A12A7 /* OWSStaleNotificationObserver.m */; }; 45C681B71D305A580050903A /* OWSCall.m in Sources */ = {isa = PBXBuildFile; fileRef = 45C681B61D305A580050903A /* OWSCall.m */; }; @@ -597,7 +597,7 @@ 4597E94F1D8313CB00040CDE /* bg */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bg; path = translations/bg.lproj/Localizable.strings; sourceTree = ""; }; 459C3F0C1C9B3A1B003ACF51 /* TSMessageAdapterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TSMessageAdapterTest.m; path = "view controllers/Signals/TSMessageAdapters/TSMessageAdapterTest.m"; sourceTree = ""; }; 45B201741DAECBFD00C461E0 /* Signal-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Signal-Bridging-Header.h"; sourceTree = ""; }; - 45B201751DAECBFE00C461E0 /* CopyableLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CopyableLabel.swift; sourceTree = ""; }; + 45B201751DAECBFE00C461E0 /* HighlightableLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HighlightableLabel.swift; sourceTree = ""; }; 45BFFFA61D898AF0004A12A7 /* OWSStaleNotificationObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OWSStaleNotificationObserver.h; path = Observers/OWSStaleNotificationObserver.h; sourceTree = ""; }; 45BFFFA71D898AF0004A12A7 /* OWSStaleNotificationObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OWSStaleNotificationObserver.m; path = Observers/OWSStaleNotificationObserver.m; sourceTree = ""; }; 45C681B51D305A580050903A /* OWSCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSCall.h; sourceTree = ""; }; @@ -1828,7 +1828,7 @@ 76EB052B18170B33006006FC /* Views */ = { isa = PBXGroup; children = ( - 45B201751DAECBFE00C461E0 /* CopyableLabel.swift */, + 45B201751DAECBFE00C461E0 /* HighlightableLabel.swift */, 45C681C11D305C9E0050903A /* OWSDisplayedMessageCollectionViewCell.h */, 45C681C21D305C9E0050903A /* OWSDisplayedMessageCollectionViewCell.m */, 45C681C31D305C9E0050903A /* OWSDisplayedMessageCollectionViewCell.xib */, @@ -3004,7 +3004,7 @@ 76EB05C618170B33006006FC /* HelloAckPacket.m in Sources */, 76EB05E818170B33006006FC /* CallFailedServerMessage.m in Sources */, 76EB05FA18170B33006006FC /* CallConnectUtil_Responder.m in Sources */, - 45B201761DAECBFE00C461E0 /* CopyableLabel.swift in Sources */, + 45B201761DAECBFE00C461E0 /* HighlightableLabel.swift in Sources */, 76EB05AE18170B33006006FC /* SrtpStream.m in Sources */, E197B61318BBEC1A00F073E5 /* DesiredBufferDepthController.m in Sources */, 76EB064818170B33006006FC /* Zid.m in Sources */, diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index 02a602478..c8f75d6c2 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -38,7 +38,7 @@ CFBundleVersion - 9992.6.5.7 + 9992.6.5.9 ITSAppUsesNonExemptEncryption LOGS_EMAIL diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 25408c41b..5f95c0f2e 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -56,7 +56,7 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; // Setting up environment [Environment setCurrent:[Release releaseEnvironmentWithLogging:logger]]; - [self setupAppearance]; + [UIUtil applySignalAppearence]; [[PushManager sharedManager] registerPushKitNotificationFuture]; if (getenv("runningTests_dontStartApp")) { @@ -318,30 +318,6 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; } } -- (void)setupAppearance { - [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; - [[UINavigationBar appearance] setBarTintColor:[UIColor ows_materialBlueColor]]; - [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; - - [[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil] setTintColor:[UIColor ows_materialBlueColor]]; - - - [[UIToolbar appearance] setTintColor:[UIColor ows_materialBlueColor]]; - [[UIBarButtonItem appearance] setTintColor:[UIColor whiteColor]]; - - NSShadow *shadow = [NSShadow new]; - [shadow setShadowColor:[UIColor clearColor]]; - - NSDictionary *navbarTitleTextAttributes = @{ - NSForegroundColorAttributeName : [UIColor whiteColor], - NSShadowAttributeName : shadow, - }; - - [[UISwitch appearance] setOnTintColor:[UIColor ows_materialBlueColor]]; - - [[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes]; -} - #pragma mark Push Notifications Delegate Methods - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { diff --git a/Signal/src/Storyboard/Main.storyboard b/Signal/src/Storyboard/Main.storyboard index 8f9addd59..93664dbe5 100644 --- a/Signal/src/Storyboard/Main.storyboard +++ b/Signal/src/Storyboard/Main.storyboard @@ -200,7 +200,7 @@ -