mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Close archive / forum on repeated click on current filter.
This commit is contained in:
parent
58f735e19b
commit
3394094dd3
1 changed files with 3 additions and 2 deletions
|
@ -1948,11 +1948,12 @@ FilterId SessionController::activeChatsFilterCurrent() const {
|
||||||
void SessionController::setActiveChatsFilter(
|
void SessionController::setActiveChatsFilter(
|
||||||
FilterId id,
|
FilterId id,
|
||||||
const SectionShow ¶ms) {
|
const SectionShow ¶ms) {
|
||||||
if (activeChatsFilterCurrent() != id) {
|
const auto changed = (activeChatsFilterCurrent() != id);
|
||||||
|
if (changed) {
|
||||||
resetFakeUnreadWhileOpened();
|
resetFakeUnreadWhileOpened();
|
||||||
}
|
}
|
||||||
_activeChatsFilter.force_assign(id);
|
_activeChatsFilter.force_assign(id);
|
||||||
if (id) {
|
if (id || !changed) {
|
||||||
closeForum();
|
closeForum();
|
||||||
closeFolder();
|
closeFolder();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue