mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Fix chat filters detection on login.
This commit is contained in:
@@ -213,7 +213,11 @@ void Step::createSession(
|
||||
}
|
||||
|
||||
auto settings = std::make_unique<Main::SessionSettings>();
|
||||
settings->setDialogsFiltersEnabled(!filters.isEmpty());
|
||||
const auto hasFilters = ranges::contains(
|
||||
filters,
|
||||
mtpc_dialogFilter,
|
||||
&MTPDialogFilter::type);
|
||||
settings->setDialogsFiltersEnabled(hasFilters);
|
||||
|
||||
const auto account = _account;
|
||||
account->createSession(user, std::move(settings));
|
||||
@@ -222,7 +226,7 @@ void Step::createSession(
|
||||
account->local().writeMtpData();
|
||||
auto &session = account->session();
|
||||
session.data().chatsFilters().setPreloaded(filters);
|
||||
if (!filters.isEmpty()) {
|
||||
if (hasFilters) {
|
||||
session.saveSettingsDelayed();
|
||||
}
|
||||
if (!photo.isNull()) {
|
||||
|
Reference in New Issue
Block a user