mirror of https://github.com/procxx/kepka.git
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
|
@ -110,7 +110,9 @@ auto DeleteAndLeaveHandler(not_null<PeerData*> peer) {
|
||||||
if (!App::main()) return;
|
if (!App::main()) return;
|
||||||
|
|
||||||
Ui::hideLayer();
|
Ui::hideLayer();
|
||||||
Ui::showChatsList();
|
if (App::wnd()->controller()->activePeer.current() == peer) {
|
||||||
|
Ui::showChatsList();
|
||||||
|
}
|
||||||
if (peer->isUser()) {
|
if (peer->isUser()) {
|
||||||
App::main()->deleteConversation(peer);
|
App::main()->deleteConversation(peer);
|
||||||
} else if (auto chat = peer->asChat()) {
|
} else if (auto chat = peer->asChat()) {
|
||||||
|
|
Loading…
Reference in New Issue