mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Check current chat before auto-closing it.
Close current chat only if it is the one being delete-and-exit'ed.
This commit is contained in:
parent
2432845df2
commit
43570d1613
1 changed files with 3 additions and 1 deletions
|
@ -110,7 +110,9 @@ auto DeleteAndLeaveHandler(not_null<PeerData*> peer) {
|
|||
if (!App::main()) return;
|
||||
|
||||
Ui::hideLayer();
|
||||
Ui::showChatsList();
|
||||
if (App::wnd()->controller()->activePeer.current() == peer) {
|
||||
Ui::showChatsList();
|
||||
}
|
||||
if (peer->isUser()) {
|
||||
App::main()->deleteConversation(peer);
|
||||
} else if (auto chat = peer->asChat()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue