Merge commit 'd7162f3d37d19f9d3a5d61d4444f7d800e22ea27'

This commit is contained in:
Ali
2020-01-17 14:20:37 +04:00
9 changed files with 24 additions and 10 deletions

View File

@@ -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
}

View File

@@ -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))

View File

@@ -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)

View File

@@ -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()
}
}
})

View File

@@ -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)

View File

@@ -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
}

View File

@@ -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

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 KiB

After

Width:  |  Height:  |  Size: 498 KiB