2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Handle some frozen cases.

This commit is contained in:
John Preston
2025-03-11 16:09:34 +04:00
parent d9b270b477
commit fbab3964e6
9 changed files with 48 additions and 9 deletions

View File

@@ -848,9 +848,10 @@ void Filler::addExportChat() {
return;
}
const auto peer = _peer;
const auto navigation = _controller;
_addAction(
tr::lng_profile_export_chat(tr::now),
[=] { PeerMenuExportChat(peer); },
[=] { PeerMenuExportChat(navigation, peer); },
&st::menuIconExport);
}
@@ -1516,7 +1517,9 @@ void Filler::fillSavedSublistActions() {
} // namespace
void PeerMenuExportChat(not_null<PeerData*> peer) {
void PeerMenuExportChat(
not_null<Window::SessionController*> controller,
not_null<PeerData*> peer) {
base::call_delayed(st::defaultPopupMenu.showDuration, [=] {
Core::App().exportManager().start(peer);
});
@@ -3126,14 +3129,20 @@ Fn<void()> ClearHistoryHandler(
not_null<Window::SessionController*> controller,
not_null<PeerData*> peer) {
return [=] {
controller->show(Box<DeleteMessagesBox>(peer, true));
if (!controller->showFrozenError()) {
controller->show(Box<DeleteMessagesBox>(peer, true));
}
};
}
Fn<void()> DeleteAndLeaveHandler(
not_null<Window::SessionController*> controller,
not_null<PeerData*> peer) {
return [=] { controller->show(Box(DeleteChatBox, peer)); };
return [=] {
if (!controller->showFrozenError()) {
controller->show(Box(DeleteChatBox, peer));
}
};
}
void FillDialogsEntryMenu(