mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
Remove delete message delay
This commit is contained in:
parent
9ba7d2effe
commit
26a88360b5
@ -17354,6 +17354,10 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
})], parseMarkdown: true), in: .window(.root))
|
})], parseMarkdown: true), in: .window(.root))
|
||||||
}
|
}
|
||||||
f(.default)
|
f(.default)
|
||||||
|
} else {
|
||||||
|
if "".isEmpty {
|
||||||
|
f(.dismissWithoutContent)
|
||||||
|
commit()
|
||||||
} else {
|
} else {
|
||||||
c.dismiss(completion: {
|
c.dismiss(completion: {
|
||||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
|
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
|
||||||
@ -17362,6 +17366,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})))
|
})))
|
||||||
items.append(ActionSheetButtonItem(title: globalTitle, color: .destructive, action: { [weak self, weak actionSheet] in
|
items.append(ActionSheetButtonItem(title: globalTitle, color: .destructive, action: { [weak self, weak actionSheet] in
|
||||||
actionSheet?.dismissAnimated()
|
actionSheet?.dismissAnimated()
|
||||||
@ -17390,15 +17395,24 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
strongSelf.updateChatPresentationInterfaceState(animated: true, interactive: true, { $0.updatedInterfaceState { $0.withoutSelectionState() } })
|
strongSelf.updateChatPresentationInterfaceState(animated: true, interactive: true, { $0.updatedInterfaceState { $0.withoutSelectionState() } })
|
||||||
|
|
||||||
c.dismiss(completion: { [weak strongSelf] in
|
let commit: () -> Void = {
|
||||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
|
guard let strongSelf = self else {
|
||||||
guard let strongSelf else {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let _ = strongSelf.context.engine.messages.deleteMessagesInteractively(messageIds: Array(messageIds), type: unsendPersonalMessages ? .forEveryone : .forLocalPeer).startStandalone()
|
let _ = strongSelf.context.engine.messages.deleteMessagesInteractively(messageIds: Array(messageIds), type: unsendPersonalMessages ? .forEveryone : .forLocalPeer).startStandalone()
|
||||||
|
}
|
||||||
|
|
||||||
|
if "".isEmpty {
|
||||||
|
f(.dismissWithoutContent)
|
||||||
|
commit()
|
||||||
|
} else {
|
||||||
|
c.dismiss(completion: {
|
||||||
|
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: {
|
||||||
|
commit()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})))
|
})))
|
||||||
items.append(ActionSheetButtonItem(title: localOptionText, color: .destructive, action: { [weak self, weak actionSheet] in
|
items.append(ActionSheetButtonItem(title: localOptionText, color: .destructive, action: { [weak self, weak actionSheet] in
|
||||||
actionSheet?.dismissAnimated()
|
actionSheet?.dismissAnimated()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user