Close archive / forum on repeated click on current filter.

This commit is contained in:
John Preston 2023-04-23 20:08:53 +04:00
parent 58f735e19b
commit 3394094dd3
1 changed files with 3 additions and 2 deletions

View File

@ -1948,11 +1948,12 @@ FilterId SessionController::activeChatsFilterCurrent() const {
void SessionController::setActiveChatsFilter(
FilterId id,
const SectionShow &params) {
if (activeChatsFilterCurrent() != id) {
const auto changed = (activeChatsFilterCurrent() != id);
if (changed) {
resetFakeUnreadWhileOpened();
}
_activeChatsFilter.force_assign(id);
if (id) {
if (id || !changed) {
closeForum();
closeFolder();
}