Fix keyboard

This commit is contained in:
Peter
2019-10-03 16:37:13 +04:00
parent ba3d2a2430
commit d27fb1fdce
22 changed files with 166 additions and 45 deletions

View File

@@ -203,6 +203,11 @@ public final class ShareController: ViewController {
return self.displayNode as! ShareControllerNode
}
private let _ready = Promise<Bool>()
override public var ready: Promise<Bool> {
return self._ready
}
private var animatedIn = false
private let sharedContext: SharedAccountContext
@@ -242,6 +247,8 @@ public final class ShareController: ViewController {
super.init(navigationBarPresentationData: nil)
self.statusBar.statusBarStyle = .Ignore
switch subject {
case let .url(text):
self.defaultAction = ShareControllerAction(title: self.presentationData.strings.ShareMenu_CopyShareLink, action: { [weak self] in
@@ -567,7 +574,7 @@ public final class ShareController: ViewController {
return .preparing
case let .done(items):
if let strongSelf = self, !items.isEmpty {
strongSelf.ready.set(.single(true))
strongSelf._ready.set(.single(true))
var activityItems: [Any] = []
for item in items {
switch item {
@@ -632,13 +639,11 @@ public final class ShareController: ViewController {
strongSelf.controllerNode.updatePeers(account: strongSelf.currentAccount, switchableAccounts: strongSelf.switchableAccounts, peers: next.0, accountPeer: next.1, defaultAction: strongSelf.defaultAction)
}
}))
self.ready.set(self.controllerNode.ready.get())
self._ready.set(self.controllerNode.ready.get())
}
override public func loadView() {
super.loadView()
self.statusBar.removeFromSupernode()
}
override public func viewDidAppear(_ animated: Bool) {