mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Fix filters in non-active accounts.
This commit is contained in:
@@ -141,7 +141,7 @@ SessionController::SessionController(
|
||||
session->data().chatsFilters().changed(
|
||||
) | rpl::start_with_next([=] {
|
||||
checkOpenedFilter();
|
||||
crl::on_main(session, [=] {
|
||||
crl::on_main(this, [=] {
|
||||
refreshFiltersMenu();
|
||||
});
|
||||
}, session->lifetime());
|
||||
@@ -216,12 +216,7 @@ void SessionController::toggleFiltersMenu(bool enabled) {
|
||||
}
|
||||
|
||||
void SessionController::refreshFiltersMenu() {
|
||||
const auto enabled = !session().data().chatsFilters().list().empty();
|
||||
if (enabled != session().settings().dialogsFiltersEnabled()) {
|
||||
session().settings().setDialogsFiltersEnabled(enabled);
|
||||
session().saveSettingsDelayed();
|
||||
toggleFiltersMenu(enabled);
|
||||
}
|
||||
toggleFiltersMenu(!session().data().chatsFilters().list().empty());
|
||||
}
|
||||
|
||||
rpl::producer<> SessionController::filtersMenuChanged() const {
|
||||
|
Reference in New Issue
Block a user