Various improvements

This commit is contained in:
Ilya Laktyushin
2022-12-17 15:35:00 +04:00
parent aeafae62df
commit 77df1cf45a
182 changed files with 6119 additions and 5449 deletions

View File

@@ -152,13 +152,8 @@ public final class QrCodeScanScreen: ViewController {
}
@objc private func cancelPressed() {
guard let layout = self.validLayout else {
return
}
self.completion(nil)
self.controllerNode.layer.animatePosition(from: CGPoint(), to: CGPoint(x: 0.0, y: layout.size.height), duration: 0.2, removeOnCompletion: false, additive: true, completion: { _ in
self.dismiss()
})
self.dismissAnimated()
}
@objc private func myCodePressed() {
@@ -210,12 +205,20 @@ public final class QrCodeScanScreen: ViewController {
}
}
public func dismissAnimated() {
guard let layout = self.validLayout else {
return
}
self.controllerNode.layer.animatePosition(from: CGPoint(), to: CGPoint(x: 0.0, y: layout.size.height), duration: 0.2, removeOnCompletion: false, additive: true, completion: { _ in
self.dismiss()
})
}
private func completeWithCode(_ code: String) {
guard case .custom = self.subject else {
return
}
self.completion(code)
self.dismiss()
}
override public func loadDisplayNode() {