diff --git a/submodules/LegacyUI/Sources/LegacyController.swift b/submodules/LegacyUI/Sources/LegacyController.swift index c2c41c8c21..df58f2cbe3 100644 --- a/submodules/LegacyUI/Sources/LegacyController.swift +++ b/submodules/LegacyUI/Sources/LegacyController.swift @@ -173,6 +173,9 @@ public final class LegacyControllerContext: NSObject, LegacyComponentsContext { } public func currentlyInSplitView() -> Bool { + if let controller = self.controller as? LegacyController, let validLayout = controller.validLayout { + return validLayout.isNonExclusive + } return false } diff --git a/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationContentNode.swift b/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationContentNode.swift index f2a564d5b7..80a45ac163 100644 --- a/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationContentNode.swift +++ b/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationContentNode.swift @@ -160,7 +160,7 @@ final class SetupTwoStepVerificationContentNode: ASDisplayNode, UITextFieldDeleg let minContentHeight = textHeight + inputHeight let contentHeight = min(215.0, max(size.height - insets.top - insets.bottom - 40.0, minContentHeight)) - let contentOrigin = insets.top + floor((size.height - insets.top - insets.bottom - contentHeight) / 2.0) + let contentOrigin = max(56.0, insets.top + floor((size.height - insets.top - insets.bottom - contentHeight) / 2.0)) let titleFrame = CGRect(origin: CGPoint(x: floor((size.width - titleSize.width) / 2.0), y: contentOrigin), size: titleSize) transition.updateFrame(node: self.titleNode, frame: titleFrame) transition.updateFrame(node: self.subtitleNode, frame: CGRect(origin: CGPoint(x: floor((size.width - subtitleSize.width) / 2.0), y: titleFrame.maxY + titleSubtitleSpacing), size: subtitleSize)) diff --git a/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationControllerNode.swift b/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationControllerNode.swift index b1eb0635ea..550b0f781c 100644 --- a/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationControllerNode.swift +++ b/submodules/PasswordSetupUI/Sources/SetupTwoStepVerificationControllerNode.swift @@ -698,7 +698,6 @@ final class SetupTwoStepVerificationControllerNode: ViewControllerTracingNode { }, transition: .animated(duration: 0.5, curve: .spring)) } if case let .enterEmail(enterEmail)? = self.innerState.data.state, case .create = enterEmail.state, enterEmail.email.isEmpty { - self.present(textAlertController(context: self.context, title: nil, text: self.presentationData.strings.TwoStepAuth_EmailSkipAlert, actions: [TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .destructiveAction, title: self.presentationData.strings.TwoStepAuth_EmailSkip, action: { continueImpl() })]), nil) diff --git a/submodules/TelegramCallsUI/Sources/CallController.swift b/submodules/TelegramCallsUI/Sources/CallController.swift index 3644129160..1181b67ea5 100644 --- a/submodules/TelegramCallsUI/Sources/CallController.swift +++ b/submodules/TelegramCallsUI/Sources/CallController.swift @@ -216,11 +216,13 @@ public final class CallController: ViewController { } |> deliverOnMainQueue).start(next: { [weak self] callsTabTip in if let strongSelf = self { if callsTabTip == 2 { - let controller = callSuggestTabController(sharedContext: strongSelf.sharedContext) - strongSelf.present(controller, in: .window(.root)) + Queue.mainQueue().after(1.0) { + let controller = callSuggestTabController(sharedContext: strongSelf.sharedContext) + strongSelf.present(controller, in: .window(.root)) + } } if callsTabTip < 3 { - let _ = ApplicationSpecificNotice.incrementCallsTabTips(accountManager: strongSelf.sharedContext.accountManager, count: 4).start() + let _ = ApplicationSpecificNotice.incrementCallsTabTips(accountManager: strongSelf.sharedContext.accountManager).start() } } }) diff --git a/submodules/TelegramNotices/Sources/Notices.swift b/submodules/TelegramNotices/Sources/Notices.swift index 01c3c17b33..f74f864b5c 100644 --- a/submodules/TelegramNotices/Sources/Notices.swift +++ b/submodules/TelegramNotices/Sources/Notices.swift @@ -129,12 +129,12 @@ private enum ApplicationSpecificGlobalNotice: Int32 { case volumeButtonToUnmuteTip = 9 case archiveChatTips = 10 case archiveIntroDismissed = 11 - case callsTabTip = 12 case cellularDataPermissionWarning = 13 case chatMessageSearchResultsTip = 14 case chatMessageOptionsTip = 15 case chatTextSelectionTip = 16 case themeChangeTip = 17 + case callsTabTip = 18 var key: ValueBoxKey { let v = ValueBoxKey(length: 4) diff --git a/submodules/TelegramUI/TelegramUI/ApplicationContext.swift b/submodules/TelegramUI/TelegramUI/ApplicationContext.swift index 5754ef44da..c28bc4b733 100644 --- a/submodules/TelegramUI/TelegramUI/ApplicationContext.swift +++ b/submodules/TelegramUI/TelegramUI/ApplicationContext.swift @@ -659,7 +659,7 @@ final class AuthorizedApplicationContext { let showCallsTabSignal = context.sharedContext.accountManager.sharedData(keys: [ApplicationSpecificSharedDataKeys.callListSettings]) |> map { sharedData -> Bool in - var value = true + var value = false if let settings = sharedData.entries[ApplicationSpecificSharedDataKeys.callListSettings] as? CallListSettings { value = settings.showTab } diff --git a/submodules/TelegramUI/TelegramUI/ChatControllerNode.swift b/submodules/TelegramUI/TelegramUI/ChatControllerNode.swift index a145f181ca..9ebd21cde6 100644 --- a/submodules/TelegramUI/TelegramUI/ChatControllerNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatControllerNode.swift @@ -77,6 +77,7 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate { } let backgroundNode: WallpaperBackgroundNode + let backgroundDisposable = MetaDisposable() let historyNode: ChatHistoryListNode let reactionContainerNode: ReactionSelectionParentNode let historyNodeContainer: ASDisplayNode @@ -280,7 +281,11 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate { } } - self.backgroundNode.image = chatControllerBackgroundImage(theme: chatPresentationInterfaceState.theme, wallpaper: chatPresentationInterfaceState.chatWallpaper, mediaBox: context.sharedContext.accountManager.mediaBox, knockoutMode: context.sharedContext.immediateExperimentalUISettings.knockoutWallpaper) + self.backgroundDisposable.set(chatControllerBackgroundImageSignal(wallpaper: chatPresentationInterfaceState.chatWallpaper, mediaBox: context.sharedContext.accountManager.mediaBox, accountMediaBox: context.account.postbox.mediaBox).start(next: { [weak self] image in + if let strongSelf = self, let (image, final) = image { + strongSelf.backgroundNode.image = image + } + })) if case .gradient = chatPresentationInterfaceState.chatWallpaper { self.backgroundNode.imageContentMode = .scaleToFill } else { @@ -1443,6 +1448,11 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate { let themeUpdated = self.chatPresentationInterfaceState.theme !== chatPresentationInterfaceState.theme if self.chatPresentationInterfaceState.chatWallpaper != chatPresentationInterfaceState.chatWallpaper { + self.backgroundDisposable.set(chatControllerBackgroundImageSignal(wallpaper: chatPresentationInterfaceState.chatWallpaper, mediaBox: self.context.sharedContext.accountManager.mediaBox, accountMediaBox: self.context.account.postbox.mediaBox).start(next: { [weak self] image in + if let strongSelf = self, let (image, final) = image { + strongSelf.backgroundNode.image = image + } + })) self.backgroundNode.image = chatControllerBackgroundImage(theme: chatPresentationInterfaceState.theme, wallpaper: chatPresentationInterfaceState.chatWallpaper, mediaBox: context.sharedContext.accountManager.mediaBox, knockoutMode: self.context.sharedContext.immediateExperimentalUISettings.knockoutWallpaper) if case .gradient = chatPresentationInterfaceState.chatWallpaper { self.backgroundNode.imageContentMode = .scaleToFill diff --git a/submodules/TelegramUI/TelegramUI/OverlayPlayerControlsNode.swift b/submodules/TelegramUI/TelegramUI/OverlayPlayerControlsNode.swift index 443ca664c0..e866e57ec7 100644 --- a/submodules/TelegramUI/TelegramUI/OverlayPlayerControlsNode.swift +++ b/submodules/TelegramUI/TelegramUI/OverlayPlayerControlsNode.swift @@ -349,14 +349,14 @@ final class OverlayPlayerControlsNode: ASDisplayNode { } let duration = value.status.duration - if duration != strongSelf.currentDuration { + if duration != strongSelf.currentDuration && !duration.isZero { strongSelf.currentDuration = duration if let layout = strongSelf.validLayout { strongSelf.updateLayout(width: layout.0, leftInset: layout.1, rightInset: layout.2, maxHeight: layout.3, transition: .immediate) } } - strongSelf.rateButton.isHidden = rateButtonIsHidden || strongSelf.currentDuration.isZero + strongSelf.rateButton.isHidden = rateButtonIsHidden } else { strongSelf.playPauseButton.isEnabled = false strongSelf.backwardButton.isEnabled = false diff --git a/submodules/TelegramUI/TelegramUI/Resources/ChatWallpaperBuiltin0.jpg b/submodules/TelegramUI/TelegramUI/Resources/ChatWallpaperBuiltin0.jpg index 688289d25e..44f7cf5262 100644 Binary files a/submodules/TelegramUI/TelegramUI/Resources/ChatWallpaperBuiltin0.jpg and b/submodules/TelegramUI/TelegramUI/Resources/ChatWallpaperBuiltin0.jpg differ