From a58a71f8f4f96836fbcb41268975b3772ced1b4c Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Fri, 5 May 2017 12:39:21 -0400 Subject: [PATCH] no contacts banner -> system settings --- Signal.xcodeproj/project.pbxproj | 18 ++-- Signal/src/Storyboard/Main.storyboard | 50 ++++++---- ...ntroller.swift => UIApplication+OWS.swift} | 4 + .../ShowGroupMembersViewController.m | 5 +- .../ViewControllers/SignalsViewController.m | 35 ++++++- Signal/src/call/OutboundCallInitiator.swift | 2 +- .../util/UIViewController+CameraPermissions.m | 10 +- Signal/src/views/NotificationView.swift | 92 +++++++++++++++++++ .../translations/en.lproj/Localizable.strings | 3 + 9 files changed, 181 insertions(+), 38 deletions(-) rename Signal/src/{UIApplication+frontmostViewController.swift => UIApplication+OWS.swift} (81%) create mode 100644 Signal/src/views/NotificationView.swift diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index d6d669578..17b3a9a7a 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -138,6 +138,8 @@ 458E38371D668EBF0094BD24 /* OWSDeviceProvisioningURLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 458E38361D668EBF0094BD24 /* OWSDeviceProvisioningURLParser.m */; }; 458E383A1D6699FA0094BD24 /* OWSDeviceProvisioningURLParserTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 458E38391D6699FA0094BD24 /* OWSDeviceProvisioningURLParserTest.m */; }; 459311FC1D75C948008DD4F0 /* OWSDeviceTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 459311FB1D75C948008DD4F0 /* OWSDeviceTableViewCell.m */; }; + 45A6DAD61EBBF85500893231 /* NotificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45A6DAD51EBBF85500893231 /* NotificationView.swift */; }; + 45A6DAD71EBBF85500893231 /* NotificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45A6DAD51EBBF85500893231 /* NotificationView.swift */; }; 45AE48511E0732D6004D96C2 /* TurnServerInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45AE48501E0732D6004D96C2 /* TurnServerInfo.swift */; }; 45AE48521E0732D6004D96C2 /* TurnServerInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45AE48501E0732D6004D96C2 /* TurnServerInfo.swift */; }; 45B201761DAECBFE00C461E0 /* HighlightableLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45B201751DAECBFE00C461E0 /* HighlightableLabel.swift */; }; @@ -146,8 +148,8 @@ 45BD60821DE9547E00A8F436 /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45BD60811DE9547E00A8F436 /* Contacts.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 45BFFFA81D898AF0004A12A7 /* OWSStaleNotificationObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 45BFFFA71D898AF0004A12A7 /* OWSStaleNotificationObserver.m */; }; 45BFFFA91D898AF0004A12A7 /* OWSStaleNotificationObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 45BFFFA71D898AF0004A12A7 /* OWSStaleNotificationObserver.m */; }; - 45C0DC1B1E68FE9000E04C47 /* UIApplication+frontmostViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C0DC1A1E68FE9000E04C47 /* UIApplication+frontmostViewController.swift */; }; - 45C0DC1C1E68FE9000E04C47 /* UIApplication+frontmostViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C0DC1A1E68FE9000E04C47 /* UIApplication+frontmostViewController.swift */; }; + 45C0DC1B1E68FE9000E04C47 /* UIApplication+OWS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C0DC1A1E68FE9000E04C47 /* UIApplication+OWS.swift */; }; + 45C0DC1C1E68FE9000E04C47 /* UIApplication+OWS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C0DC1A1E68FE9000E04C47 /* UIApplication+OWS.swift */; }; 45C0DC1E1E69011F00E04C47 /* UIStoryboard+OWS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C0DC1D1E69011F00E04C47 /* UIStoryboard+OWS.swift */; }; 45C0DC1F1E69011F00E04C47 /* UIStoryboard+OWS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C0DC1D1E69011F00E04C47 /* UIStoryboard+OWS.swift */; }; 45C681B71D305A580050903A /* OWSCall.m in Sources */ = {isa = PBXBuildFile; fileRef = 45C681B61D305A580050903A /* OWSCall.m */; }; @@ -542,6 +544,7 @@ 459311FB1D75C948008DD4F0 /* OWSDeviceTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSDeviceTableViewCell.m; sourceTree = ""; }; 4597E94E1D8313C100040CDE /* sq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sq; path = translations/sq.lproj/Localizable.strings; sourceTree = ""; }; 4597E94F1D8313CB00040CDE /* bg */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bg; path = translations/bg.lproj/Localizable.strings; sourceTree = ""; }; + 45A6DAD51EBBF85500893231 /* NotificationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationView.swift; sourceTree = ""; }; 45AE48501E0732D6004D96C2 /* TurnServerInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TurnServerInfo.swift; sourceTree = ""; }; 45B201741DAECBFD00C461E0 /* Signal-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Signal-Bridging-Header.h"; sourceTree = ""; }; 45B201751DAECBFE00C461E0 /* HighlightableLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HighlightableLabel.swift; sourceTree = ""; }; @@ -549,7 +552,7 @@ 45BD60811DE9547E00A8F436 /* Contacts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Contacts.framework; path = System/Library/Frameworks/Contacts.framework; sourceTree = SDKROOT; }; 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 = ""; }; - 45C0DC1A1E68FE9000E04C47 /* UIApplication+frontmostViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIApplication+frontmostViewController.swift"; sourceTree = ""; }; + 45C0DC1A1E68FE9000E04C47 /* UIApplication+OWS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIApplication+OWS.swift"; sourceTree = ""; }; 45C0DC1D1E69011F00E04C47 /* UIStoryboard+OWS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIStoryboard+OWS.swift"; sourceTree = ""; }; 45C681B51D305A580050903A /* OWSCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSCall.h; sourceTree = ""; }; 45C681B61D305A580050903A /* OWSCall.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSCall.m; sourceTree = ""; }; @@ -1317,6 +1320,7 @@ 34330AA11E79686200DF2FB9 /* OWSProgressView.h */, 34330AA21E79686200DF2FB9 /* OWSProgressView.m */, 452EA09D1EA7ABE00078744B /* AttachmentPointerView.swift */, + 45A6DAD51EBBF85500893231 /* NotificationView.swift */, ); name = Views; path = views; @@ -1616,7 +1620,7 @@ 344F2F651E57A932000D9322 /* UIViewController+OWS.h */, 344F2F661E57A932000D9322 /* UIViewController+OWS.m */, 45BB93371E688E14001E3939 /* UIDevice+featureSupport.swift */, - 45C0DC1A1E68FE9000E04C47 /* UIApplication+frontmostViewController.swift */, + 45C0DC1A1E68FE9000E04C47 /* UIApplication+OWS.swift */, 45C0DC1D1E69011F00E04C47 /* UIStoryboard+OWS.swift */, ); name = "UI Categories"; @@ -2066,6 +2070,7 @@ 452EA0971EA662330078744B /* AttachmentPointerAdapter.swift in Sources */, 34DFCB851E8E04B500053165 /* AddToBlockListViewController.m in Sources */, 45855F371D9498A40084F340 /* OWSContactAvatarBuilder.m in Sources */, + 45A6DAD61EBBF85500893231 /* NotificationView.swift in Sources */, 45666EC61D99483D008FE134 /* OWSAvatarBuilder.m in Sources */, 45E615161E8C590B0018AD52 /* DisplayableTextFilter.swift in Sources */, 34B3F88A1E8DF1700035BE1A /* OWSLinkDeviceViewController.m in Sources */, @@ -2092,7 +2097,7 @@ 45F659821E1BE77000444429 /* NonCallKitCallUIAdaptee.swift in Sources */, 45AE48511E0732D6004D96C2 /* TurnServerInfo.swift in Sources */, 34B3F8771E8DF1700035BE1A /* ContactsPicker.swift in Sources */, - 45C0DC1B1E68FE9000E04C47 /* UIApplication+frontmostViewController.swift in Sources */, + 45C0DC1B1E68FE9000E04C47 /* UIApplication+OWS.swift in Sources */, 34535D821E256BE9008A4747 /* UIView+OWS.m in Sources */, 45F3AEB61DFDE7900080CE33 /* AvatarImageView.swift in Sources */, 7038632718F70C0700D4A43F /* CryptoTools.m in Sources */, @@ -2158,7 +2163,7 @@ 456F6E251E24216100FD2210 /* DataChannelMessage.swift in Sources */, 452ECA4E1E087E7200E2F016 /* MessageFetcherJob.swift in Sources */, 45F170AD1E2F0351003FC1F2 /* CallAudioSession.swift in Sources */, - 45C0DC1C1E68FE9000E04C47 /* UIApplication+frontmostViewController.swift in Sources */, + 45C0DC1C1E68FE9000E04C47 /* UIApplication+OWS.swift in Sources */, 45F170BC1E2FC5D3003FC1F2 /* CallAudioService.swift in Sources */, 456F6E2F1E261D1000FD2210 /* PeerConnectionClientTest.swift in Sources */, 452C46901E427E200087B011 /* OutboundCallInitiator.swift in Sources */, @@ -2226,6 +2231,7 @@ 45E615171E8C59100018AD52 /* DisplayableTextFilter.swift in Sources */, B660F6DF1C29868000687D6E /* QueueTest.m in Sources */, B660F6BB1C29868000687D6E /* OWSContactsManagerTest.m in Sources */, + 45A6DAD71EBBF85500893231 /* NotificationView.swift in Sources */, B660F6DD1C29868000687D6E /* ObservableTest.m in Sources */, B660F6D21C29868000687D6E /* PushManagerTest.m in Sources */, 45C0DC1F1E69011F00E04C47 /* UIStoryboard+OWS.swift in Sources */, diff --git a/Signal/src/Storyboard/Main.storyboard b/Signal/src/Storyboard/Main.storyboard index a7fd8e95f..90d64c970 100644 --- a/Signal/src/Storyboard/Main.storyboard +++ b/Signal/src/Storyboard/Main.storyboard @@ -30,27 +30,28 @@ - + - + - - + + + + + + + + + + + + - - - - - - + + + + + + + - - + + @@ -90,6 +100,8 @@ + + @@ -432,10 +444,10 @@ - + - + - + - +