mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 20:00:38 +00:00
Fix allow write setting when adding attach menu bot
This commit is contained in:
parent
a460d06411
commit
67f34ab53d
@ -226,7 +226,7 @@ private func twoStepVerificationUnlockSettingsControllerEntries(presentationData
|
|||||||
if remainingSeconds <= 0 {
|
if remainingSeconds <= 0 {
|
||||||
text += "[" + presentationData.strings.TwoStepAuth_ResetAction + "](reset)"
|
text += "[" + presentationData.strings.TwoStepAuth_ResetAction + "](reset)"
|
||||||
} else {
|
} else {
|
||||||
text.append(presentationData.strings.TwoStepAuth_ResetPendingText(timeIntervalString(strings: presentationData.strings, value: remainingSeconds)).string)
|
text.append(presentationData.strings.TwoStepAuth_ResetPendingText(timeIntervalString(strings: presentationData.strings, value: remainingSeconds, usage: .afterTime)).string)
|
||||||
text.append("\n[\(presentationData.strings.TwoStepAuth_CancelResetTitle)](declineReset)")
|
text.append("\n[\(presentationData.strings.TwoStepAuth_CancelResetTitle)](declineReset)")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -108,7 +108,6 @@ private final class WebAppAlertContentNode: AlertContentNode {
|
|||||||
self.addSubnode(self.allowWriteLabelNode)
|
self.addSubnode(self.allowWriteLabelNode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
self.addSubnode(self.actionNodesSeparator)
|
self.addSubnode(self.actionNodesSeparator)
|
||||||
|
|
||||||
for actionNode in self.actionNodes {
|
for actionNode in self.actionNodes {
|
||||||
@ -316,10 +315,14 @@ public func addWebAppToAttachmentController(context: AccountContext, peerName: S
|
|||||||
var contentNode: WebAppAlertContentNode?
|
var contentNode: WebAppAlertContentNode?
|
||||||
let actions: [TextAlertAction] = [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {
|
let actions: [TextAlertAction] = [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {
|
||||||
dismissImpl?(true)
|
dismissImpl?(true)
|
||||||
}), TextAlertAction(type: .defaultAction, title: presentationData.strings.WebApp_AddToAttachmentAdd, action: {
|
}), TextAlertAction(type: .defaultAction, title: presentationData.strings.WebApp_AddToAttachmentAdd, action: { [weak contentNode] in
|
||||||
dismissImpl?(true)
|
dismissImpl?(true)
|
||||||
|
|
||||||
completion(true)
|
if requestWriteAccess, let allowWriteAccess = contentNode?.allowWriteAccess {
|
||||||
|
completion(allowWriteAccess)
|
||||||
|
} else {
|
||||||
|
completion(false)
|
||||||
|
}
|
||||||
})]
|
})]
|
||||||
|
|
||||||
contentNode = WebAppAlertContentNode(account: context.account, theme: AlertControllerTheme(presentationData: presentationData), ptheme: theme, strings: strings, peerName: peerName, icons: icons, requestWriteAccess: requestWriteAccess, actions: actions)
|
contentNode = WebAppAlertContentNode(account: context.account, theme: AlertControllerTheme(presentationData: presentationData), ptheme: theme, strings: strings, peerName: peerName, icons: icons, requestWriteAccess: requestWriteAccess, actions: actions)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user