mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
fix: one more condition for back from archived chats with hide all chats
Co-authored-by: c0re100 <corehusky@gmail.com>
This commit is contained in:
parent
163252b890
commit
3f74919ba6
1 changed files with 12 additions and 1 deletions
|
@ -470,7 +470,18 @@ void ApiWrap::toggleHistoryArchived(
|
||||||
if (archived) {
|
if (archived) {
|
||||||
history->setFolder(_session->data().folder(archiveId));
|
history->setFolder(_session->data().folder(archiveId));
|
||||||
} else {
|
} else {
|
||||||
history->clearFolder();
|
const auto settings = &AyuSettings::getInstance();
|
||||||
|
if (settings->hideAllChatsFolder) {
|
||||||
|
if (const auto window = Core::App().activeWindow()) {
|
||||||
|
if (const auto controller = window->sessionController()) {
|
||||||
|
const auto filters = &_session->data().chatsFilters();
|
||||||
|
const auto lookup_id = filters->lookupId(controller->session().premium() ? 0 : 1);
|
||||||
|
controller->setActiveChatsFilter(lookup_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
history->clearFolder();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (const auto data = _historyArchivedRequests.take(history)) {
|
if (const auto data = _historyArchivedRequests.take(history)) {
|
||||||
data->second();
|
data->second();
|
||||||
|
|
Loading…
Add table
Reference in a new issue