Updated comments

This commit is contained in:
Ali
2020-09-01 22:20:55 +01:00
parent 0b48fe6a52
commit 1f6311e414
49 changed files with 1013 additions and 2465 deletions

View File

@@ -69,9 +69,11 @@ final class ChatSendMessageActionSheetController: ViewController {
var reminders = false
var isSecret = false
var canSchedule = false
if case let .peer(peerId) = self.interfaceState.chatLocation {
reminders = peerId == context.account.peerId
isSecret = peerId.namespace == Namespaces.Peer.SecretChat
canSchedule = !isSecret
}
self.displayNode = ChatSendMessageActionSheetControllerNode(context: self.context, reminders: reminders, gesture: gesture, sendButtonFrame: self.sendButtonFrame, textInputNode: self.textInputNode, forwardedCount: forwardedCount, send: { [weak self] in
@@ -80,7 +82,7 @@ final class ChatSendMessageActionSheetController: ViewController {
}, sendSilently: { [weak self] in
self?.controllerInteraction?.sendCurrentMessage(true)
self?.dismiss(cancel: false)
}, schedule: isSecret ? nil : { [weak self] in
}, schedule: !canSchedule ? nil : { [weak self] in
self?.controllerInteraction?.scheduleCurrentMessage()
self?.dismiss(cancel: false)
}, cancel: { [weak self] in