diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index fb8c7f684..af3509499 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -444,6 +444,7 @@ 4C3EF802210918740007EBF7 /* SSKProtoEnvelopeTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3EF801210918740007EBF7 /* SSKProtoEnvelopeTest.swift */; }; 4C4AEC4520EC343B0020E72B /* DismissableTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4AEC4420EC343B0020E72B /* DismissableTextField.swift */; }; 4C4BC6C32102D697004040C9 /* ContactDiscoveryOperationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4BC6C22102D697004040C9 /* ContactDiscoveryOperationTest.swift */; }; + 4C61819F219E1796009BD6B5 /* typing-animation-dark.gif in Resources */ = {isa = PBXBuildFile; fileRef = 4C61819E219E1795009BD6B5 /* typing-animation-dark.gif */; }; 4C63CC00210A620B003AE45C /* SignalTSan.supp in Resources */ = {isa = PBXBuildFile; fileRef = 4C63CBFF210A620B003AE45C /* SignalTSan.supp */; }; 4C6F527C20FFE8400097DEEE /* SignalUBSan.supp in Resources */ = {isa = PBXBuildFile; fileRef = 4C6F527B20FFE8400097DEEE /* SignalUBSan.supp */; }; 4C7537892193779700DF5E37 /* OWS113MultiAttachmentMediaMessages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7537882193779700DF5E37 /* OWS113MultiAttachmentMediaMessages.swift */; }; @@ -1154,6 +1155,7 @@ 4C3EF801210918740007EBF7 /* SSKProtoEnvelopeTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSKProtoEnvelopeTest.swift; sourceTree = ""; }; 4C4AEC4420EC343B0020E72B /* DismissableTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DismissableTextField.swift; sourceTree = ""; }; 4C4BC6C22102D697004040C9 /* ContactDiscoveryOperationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ContactDiscoveryOperationTest.swift; path = contact/ContactDiscoveryOperationTest.swift; sourceTree = ""; }; + 4C61819E219E1795009BD6B5 /* typing-animation-dark.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "typing-animation-dark.gif"; sourceTree = ""; }; 4C63CBFF210A620B003AE45C /* SignalTSan.supp */ = {isa = PBXFileReference; lastKnownFileType = text; path = SignalTSan.supp; sourceTree = ""; }; 4C6F527B20FFE8400097DEEE /* SignalUBSan.supp */ = {isa = PBXFileReference; lastKnownFileType = text; path = SignalUBSan.supp; sourceTree = ""; }; 4C7537882193779700DF5E37 /* OWS113MultiAttachmentMediaMessages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OWS113MultiAttachmentMediaMessages.swift; sourceTree = ""; }; @@ -2323,6 +2325,7 @@ B633C54C1A1D190B0059AC12 /* quit@2x.png */, B633C5501A1D190B0059AC12 /* savephoto@2x.png */, 34B6A90A218BA1D0007C4606 /* typing-animation.gif */, + 4C61819E219E1795009BD6B5 /* typing-animation-dark.gif */, FC5CDF381A3393DD00B47253 /* warning_white@2x.png */, ); path = Images; @@ -2913,6 +2916,7 @@ 45B74A7E2044AAB600CD42F8 /* complete.aifc in Resources */, 45B74A872044AAB600CD42F8 /* complete-quiet.aifc in Resources */, 45B74A772044AAB600CD42F8 /* hello.aifc in Resources */, + 4C61819F219E1796009BD6B5 /* typing-animation-dark.gif in Resources */, 45B74A7C2044AAB600CD42F8 /* hello-quiet.aifc in Resources */, 45B74A792044AAB600CD42F8 /* input.aifc in Resources */, 45B74A8C2044AAB600CD42F8 /* input-quiet.aifc in Resources */, diff --git a/Signal/Images/typing-animation-dark.gif b/Signal/Images/typing-animation-dark.gif new file mode 100644 index 000000000..1f592f320 Binary files /dev/null and b/Signal/Images/typing-animation-dark.gif differ diff --git a/Signal/src/ViewControllers/ExperienceUpgradesPageViewController.swift b/Signal/src/ViewControllers/ExperienceUpgradesPageViewController.swift index 731da061f..29974ea9d 100644 --- a/Signal/src/ViewControllers/ExperienceUpgradesPageViewController.swift +++ b/Signal/src/ViewControllers/ExperienceUpgradesPageViewController.swift @@ -258,7 +258,8 @@ private class IntroductingTypingIndicatorsExperienceUpgradeViewController: Exper // Image let imageView: UIView - if let gifPath = Bundle.main.path(forResource: "typing-animation", ofType: "gif") { + let imageName = Theme.isDarkThemeEnabled ? "typing-animation-dark" : "typing-animation" + if let gifPath = Bundle.main.path(forResource: imageName, ofType: "gif") { let animatedImage = YYImage(contentsOfFile: gifPath) imageView = YYAnimatedImageView(image: animatedImage) } else { @@ -506,14 +507,17 @@ private class CallKitExperienceUpgradeViewController: ExperienceUpgradeViewContr // dismiss the modally presented view controller, then proceed. experienceUpgradesPageViewController.dismiss(animated: true) { - let fromViewController = UIApplication.shared.frontmostViewController - assert(fromViewController != nil) + DispatchQueue.main.async { + guard let fromViewController = UIApplication.shared.frontmostViewController else { + owsFailDebug("fromViewController was unexpectedly nil") + return + } - // Construct the "settings" view & push the "privacy settings" view. - let navigationController = AppSettingsViewController.inModalNavigationController() - navigationController.pushViewController(PrivacySettingsTableViewController(), animated: false) - - fromViewController?.present(navigationController, animated: true, completion: nil) + // Construct the "settings" view & push the "privacy settings" view. + let navigationController = AppSettingsViewController.inModalNavigationController() + navigationController.pushViewController(PrivacySettingsTableViewController(), animated: false) + fromViewController.present(navigationController, animated: true, completion: nil) + } } } }