Add phone number validation block removal animation

This commit is contained in:
Ilya Laktyushin
2021-06-13 13:27:35 +03:00
parent 6d5b133433
commit 4d37b67932
2 changed files with 8 additions and 4 deletions

View File

@@ -143,7 +143,7 @@ public final class ChangePhoneNumberIntroController: ViewController {
}
func proceed() {
self.present(textAlertController(context: self.context, title: nil, text: self.presentationData.strings.PhoneNumberHelp_Alert, actions: [TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: self.presentationData.strings.Common_OK, action: { [weak self] in
self.present(textAlertController(context: self.context, title: nil, text: self.presentationData.strings.PhoneNumberHelp_Alert, actions: [TextAlertAction(type: .defaultAction, title: self.presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: self.presentationData.strings.TwoFactorSetup_Email_Action, action: { [weak self] in
if let strongSelf = self {
(strongSelf.navigationController as? NavigationController)?.replaceTopController(ChangePhoneNumberController(context: strongSelf.context), animated: true)
}

View File

@@ -2925,7 +2925,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
var currentCallsPrivate: Bool?
var previousVideoCallsAvailable: Bool? = true
var currentVideoCallsAvailable: Bool?
if let previousCachedData = previousData?.cachedData as? CachedUserData, let cachedData = data.cachedData as? CachedUserData {
previousCallsPrivate = previousCachedData.callsPrivate ?? false
currentCallsPrivate = cachedData.callsPrivate
@@ -2934,10 +2934,12 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
currentVideoCallsAvailable = cachedData.videoCallsAvailable
}
if let previousSuggestPhoneNumberConfirmation = previousData?.globalSettings?.suggestPhoneNumberConfirmation, previousSuggestPhoneNumberConfirmation != data.globalSettings?.suggestPhoneNumberConfirmation {
infoUpdated = true
}
if previousCallsPrivate != currentCallsPrivate || previousVideoCallsAvailable != currentVideoCallsAvailable {
infoUpdated = true
}
if (previousCall == nil) != (currentCall == nil) {
infoUpdated = true
}
@@ -5869,7 +5871,9 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
}
for sectionId in removeRegularSections {
if let sectionNode = self.regularSections.removeValue(forKey: sectionId) {
sectionNode.removeFromSupernode()
transition.updateAlpha(node: sectionNode, alpha: 0.0, completion: { [weak sectionNode] _ in
sectionNode?.removeFromSupernode()
})
}
}