Skip to content

Commit

Permalink
Check current chat before auto-closing it.
Browse files Browse the repository at this point in the history
Close current chat only if it is the one being delete-and-exit'ed.
  • Loading branch information
john-preston committed Nov 30, 2017
1 parent 2432845 commit 43570d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Telegram/SourceFiles/window/window_peer_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 43570d1

Please sign in to comment.