Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-10-14 04:40:07 +04:00
parent 1ec1f5ca78
commit d8d344d2c1
40 changed files with 1932 additions and 293 deletions

View File

@@ -66,7 +66,7 @@ public final class JoinLinkPreviewController: ViewController {
}
self.displayNodeDidLoad()
let signal: Signal<ExternalJoiningChatState, NoError>
let signal: Signal<ExternalJoiningChatState, JoinLinkInfoError>
if let resolvedState = self.resolvedState {
signal = .single(resolvedState)
} else {
@@ -99,6 +99,16 @@ public final class JoinLinkPreviewController: ViewController {
strongSelf.dismiss()
}
}
}, error: { [weak self] error in
if let strongSelf = self {
switch error {
case .flood:
strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: strongSelf.presentationData.strings.TwoStepAuth_FloodError, actions: [TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_OK, action: {})]), in: .window(.root))
default:
break
}
strongSelf.dismiss()
}
}))
self.ready.set(self.controllerNode.ready.get())
}