Moved JSON settings
This commit is contained in:
parent
fea7148e9b
commit
29610ddda2
10 changed files with 43 additions and 39 deletions
|
|
@ -309,8 +309,8 @@ PRIVATE
|
||||||
core/crash_reports.h
|
core/crash_reports.h
|
||||||
core/file_utilities.cpp
|
core/file_utilities.cpp
|
||||||
core/file_utilities.h
|
core/file_utilities.h
|
||||||
core/kotato_settings.cpp
|
kotato/json_settings.cpp
|
||||||
core/kotato_settings.h
|
kotato/json_settings.h
|
||||||
core/launcher.cpp
|
core/launcher.cpp
|
||||||
core/launcher.h
|
core/launcher.h
|
||||||
core/local_url_handlers.cpp
|
core/local_url_handlers.cpp
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_chat_filters.h"
|
#include "data/data_chat_filters.h"
|
||||||
#include "data/data_peer.h"
|
#include "data/data_peer.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "core/kotato_settings.h"
|
#include "kotato/json_settings.h"
|
||||||
#include "settings/settings_common.h"
|
#include "settings/settings_common.h"
|
||||||
#include "base/event_filter.h"
|
#include "base/event_filter.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
|
|
@ -696,7 +696,7 @@ void EditExistingFilter(
|
||||||
if ((isCurrentDefault && !result.isDefault())
|
if ((isCurrentDefault && !result.isDefault())
|
||||||
|| (!isCurrentDefault && result.isDefault())) {
|
|| (!isCurrentDefault && result.isDefault())) {
|
||||||
cSetDefaultFilterId(result.isDefault() ? result.id() : 0);
|
cSetDefaultFilterId(result.isDefault() ? result.id() : 0);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
window->window().show(Box(
|
window->window().show(Box(
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ https://github.com/kotatogram/kotatogram-desktop/blob/dev/LEGAL
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "boxes/confirm_box.h"
|
#include "boxes/confirm_box.h"
|
||||||
#include "core/kotato_settings.h"
|
#include "kotato/json_settings.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
|
||||||
|
|
@ -116,7 +116,7 @@ void FontsBox::save() {
|
||||||
cSetSemiboldFont(semiboldFont);
|
cSetSemiboldFont(semiboldFont);
|
||||||
cSetSemiboldFontIsBold(semiboldIsBold);
|
cSetSemiboldFontIsBold(semiboldIsBold);
|
||||||
cSetMonospaceFont(monospacedFont);
|
cSetMonospaceFont(monospacedFont);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
App::restart();
|
App::restart();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -142,7 +142,7 @@ void FontsBox::resetToDefault() {
|
||||||
cSetUseSystemFont(false);
|
cSetUseSystemFont(false);
|
||||||
#endif
|
#endif
|
||||||
cSetUseOriginalMetrics(false);
|
cSetUseOriginalMetrics(false);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
App::restart();
|
App::restart();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "boxes/confirm_box.h"
|
#include "boxes/confirm_box.h"
|
||||||
#include "core/kotato_settings.h"
|
#include "kotato/json_settings.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
|
||||||
NetBoostBox::NetBoostBox(QWidget* parent)
|
NetBoostBox::NetBoostBox(QWidget* parent)
|
||||||
|
|
@ -74,7 +74,7 @@ QString NetBoostBox::BoostLabel(int boost) {
|
||||||
void NetBoostBox::save() {
|
void NetBoostBox::save() {
|
||||||
const auto changeBoost = [=] {
|
const auto changeBoost = [=] {
|
||||||
SetNetworkBoost(_boostGroup->value());
|
SetNetworkBoost(_boostGroup->value());
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
App::restart();
|
App::restart();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "core/sandbox.h"
|
#include "core/sandbox.h"
|
||||||
#include "core/local_url_handlers.h"
|
#include "core/local_url_handlers.h"
|
||||||
#include "core/launcher.h"
|
#include "core/launcher.h"
|
||||||
#include "core/kotato_settings.h"
|
#include "kotato/json_settings.h"
|
||||||
#include "core/ui_integration.h"
|
#include "core/ui_integration.h"
|
||||||
#include "chat_helpers/emoji_keywords.h"
|
#include "chat_helpers/emoji_keywords.h"
|
||||||
#include "storage/localstorage.h"
|
#include "storage/localstorage.h"
|
||||||
|
|
@ -177,12 +177,12 @@ Application::~Application() {
|
||||||
Global::finish();
|
Global::finish();
|
||||||
ThirdParty::finish();
|
ThirdParty::finish();
|
||||||
|
|
||||||
KotatoSettings::Finish();
|
Kotato::JsonSettings::Finish();
|
||||||
Instance = nullptr;
|
Instance = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::run() {
|
void Application::run() {
|
||||||
KotatoSettings::Start();
|
Kotato::JsonSettings::Start();
|
||||||
if (!cMainFont().isEmpty()) {
|
if (!cMainFont().isEmpty()) {
|
||||||
style::internal::CustomMainFont = cMainFont();
|
style::internal::CustomMainFont = cMainFont();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ the unofficial app based on Telegram Desktop.
|
||||||
For license and copyright information please follow this link:
|
For license and copyright information please follow this link:
|
||||||
https://github.com/kotatogram/kotatogram-desktop/blob/dev/LEGAL
|
https://github.com/kotatogram/kotatogram-desktop/blob/dev/LEGAL
|
||||||
*/
|
*/
|
||||||
#include "core/kotato_settings.h"
|
#include "kotato/json_settings.h"
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
|
|
@ -21,7 +21,8 @@ https://github.com/kotatogram/kotatogram-desktop/blob/dev/LEGAL
|
||||||
#include <QtCore/QJsonValue>
|
#include <QtCore/QJsonValue>
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
|
|
||||||
namespace KotatoSettings {
|
namespace Kotato {
|
||||||
|
namespace JsonSettings {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
constexpr auto kWriteJsonTimeout = crl::time(5000);
|
constexpr auto kWriteJsonTimeout = crl::time(5000);
|
||||||
|
|
@ -541,4 +542,5 @@ void Finish() {
|
||||||
Data->write(true);
|
Data->write(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace KotatoSettings
|
} // namespace JsonSettings
|
||||||
|
} // namespace Kotato
|
||||||
|
|
@ -9,7 +9,8 @@ https://github.com/kotatogram/kotatogram-desktop/blob/dev/LEGAL
|
||||||
|
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
|
|
||||||
namespace KotatoSettings {
|
namespace Kotato {
|
||||||
|
namespace JsonSettings {
|
||||||
|
|
||||||
class Manager : public QObject {
|
class Manager : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
@ -36,4 +37,5 @@ void Start();
|
||||||
void Write();
|
void Write();
|
||||||
void Finish();
|
void Finish();
|
||||||
|
|
||||||
} // namespace KotatoSettings
|
} // namespace JsonSettings
|
||||||
|
} // namespace Kotato
|
||||||
|
|
@ -24,7 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/wrap/slide_wrap.h"
|
#include "ui/wrap/slide_wrap.h"
|
||||||
#include "ui/painter.h"
|
#include "ui/painter.h"
|
||||||
#include "ui/filter_icons.h"
|
#include "ui/filter_icons.h"
|
||||||
#include "core/kotato_settings.h"
|
#include "kotato/json_settings.h"
|
||||||
#include "settings/settings_common.h"
|
#include "settings/settings_common.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
|
@ -593,7 +593,7 @@ void FilterRowButton::paintEvent(QPaintEvent *e) {
|
||||||
controller->setActiveChatsFilter(0);
|
controller->setActiveChatsFilter(0);
|
||||||
}
|
}
|
||||||
if (currentDefaultId != cDefaultFilterId()) {
|
if (currentDefaultId != cDefaultFilterId()) {
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ https://github.com/kotatogram/kotatogram-desktop/blob/dev/LEGAL
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "core/update_checker.h"
|
#include "core/update_checker.h"
|
||||||
#include "core/kotato_settings.h"
|
#include "kotato/json_settings.h"
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "storage/localstorage.h"
|
#include "storage/localstorage.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
|
|
@ -64,7 +64,7 @@ void SetupKotatoChats(not_null<Ui::VerticalLayout*> container) {
|
||||||
const auto updateRecentStickersLimitHeight = [=](int value) {
|
const auto updateRecentStickersLimitHeight = [=](int value) {
|
||||||
updateRecentStickersLimitLabel(value);
|
updateRecentStickersLimitLabel(value);
|
||||||
SetRecentStickersLimit(value);
|
SetRecentStickersLimit(value);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
};
|
};
|
||||||
recentStickersLimitSlider->resize(st::settingsAudioVolumeSlider.seekSize);
|
recentStickersLimitSlider->resize(st::settingsAudioVolumeSlider.seekSize);
|
||||||
recentStickersLimitSlider->setPseudoDiscrete(
|
recentStickersLimitSlider->setPseudoDiscrete(
|
||||||
|
|
@ -85,7 +85,7 @@ void SetupKotatoChats(not_null<Ui::VerticalLayout*> container) {
|
||||||
return (enabled != cProfileTopBarNotifications());
|
return (enabled != cProfileTopBarNotifications());
|
||||||
}) | rpl::start_with_next([](bool enabled) {
|
}) | rpl::start_with_next([](bool enabled) {
|
||||||
cSetProfileTopBarNotifications(enabled);
|
cSetProfileTopBarNotifications(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddButton(
|
AddButton(
|
||||||
|
|
@ -99,7 +99,7 @@ void SetupKotatoChats(not_null<Ui::VerticalLayout*> container) {
|
||||||
return (enabled != cDisableUpEdit());
|
return (enabled != cDisableUpEdit());
|
||||||
}) | rpl::start_with_next([](bool enabled) {
|
}) | rpl::start_with_next([](bool enabled) {
|
||||||
cSetDisableUpEdit(enabled);
|
cSetDisableUpEdit(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddButton(
|
AddButton(
|
||||||
|
|
@ -113,7 +113,7 @@ void SetupKotatoChats(not_null<Ui::VerticalLayout*> container) {
|
||||||
return (enabled != (DialogListLines() == 1));
|
return (enabled != (DialogListLines() == 1));
|
||||||
}) | rpl::start_with_next([](bool enabled) {
|
}) | rpl::start_with_next([](bool enabled) {
|
||||||
SetDialogListLines(enabled ? 1 : 2);
|
SetDialogListLines(enabled ? 1 : 2);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddButton(
|
AddButton(
|
||||||
|
|
@ -128,7 +128,7 @@ void SetupKotatoChats(not_null<Ui::VerticalLayout*> container) {
|
||||||
}) | rpl::start_with_next([](bool enabled) {
|
}) | rpl::start_with_next([](bool enabled) {
|
||||||
cSetAlwaysShowScheduled(enabled);
|
cSetAlwaysShowScheduled(enabled);
|
||||||
Notify::showScheduledButtonChanged();
|
Notify::showScheduledButtonChanged();
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddButton(
|
AddButton(
|
||||||
|
|
@ -165,7 +165,7 @@ void SetupKotatoMessages(not_null<Ui::VerticalLayout*> container) {
|
||||||
const auto updateStickerHeight = [=](int value) {
|
const auto updateStickerHeight = [=](int value) {
|
||||||
updateStickerHeightLabel(value);
|
updateStickerHeightLabel(value);
|
||||||
SetStickerHeight(value);
|
SetStickerHeight(value);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
};
|
};
|
||||||
stickerHeightSlider->resize(st::settingsAudioVolumeSlider.seekSize);
|
stickerHeightSlider->resize(st::settingsAudioVolumeSlider.seekSize);
|
||||||
stickerHeightSlider->setPseudoDiscrete(
|
stickerHeightSlider->setPseudoDiscrete(
|
||||||
|
|
@ -186,7 +186,7 @@ void SetupKotatoMessages(not_null<Ui::VerticalLayout*> container) {
|
||||||
return (enabled != AdaptiveBubbles());
|
return (enabled != AdaptiveBubbles());
|
||||||
}) | rpl::start_with_next([](bool enabled) {
|
}) | rpl::start_with_next([](bool enabled) {
|
||||||
SetAdaptiveBubbles(enabled);
|
SetAdaptiveBubbles(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddButton(
|
AddButton(
|
||||||
|
|
@ -200,7 +200,7 @@ void SetupKotatoMessages(not_null<Ui::VerticalLayout*> container) {
|
||||||
return (enabled != BigEmojiOutline());
|
return (enabled != BigEmojiOutline());
|
||||||
}) | rpl::start_with_next([](bool enabled) {
|
}) | rpl::start_with_next([](bool enabled) {
|
||||||
SetBigEmojiOutline(enabled);
|
SetBigEmojiOutline(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddSkip(container);
|
AddSkip(container);
|
||||||
|
|
@ -241,7 +241,7 @@ void SetupKotatoFolders(
|
||||||
return (enabled != cUnmutedFilterCounterOnly());
|
return (enabled != cUnmutedFilterCounterOnly());
|
||||||
}) | rpl::start_with_next([=](bool enabled) {
|
}) | rpl::start_with_next([=](bool enabled) {
|
||||||
cSetUnmutedFilterCounterOnly(enabled);
|
cSetUnmutedFilterCounterOnly(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
controller->reloadFiltersMenu();
|
controller->reloadFiltersMenu();
|
||||||
App::wnd()->fixOrder();
|
App::wnd()->fixOrder();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
@ -257,7 +257,7 @@ void SetupKotatoFolders(
|
||||||
return (enabled != cHideFilterAllChats());
|
return (enabled != cHideFilterAllChats());
|
||||||
}) | rpl::start_with_next([=](bool enabled) {
|
}) | rpl::start_with_next([=](bool enabled) {
|
||||||
cSetHideFilterAllChats(enabled);
|
cSetHideFilterAllChats(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
controller->reloadFiltersMenu();
|
controller->reloadFiltersMenu();
|
||||||
App::wnd()->fixOrder();
|
App::wnd()->fixOrder();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
@ -273,7 +273,7 @@ void SetupKotatoFolders(
|
||||||
return (enabled != cHideFilterEditButton());
|
return (enabled != cHideFilterEditButton());
|
||||||
}) | rpl::start_with_next([=](bool enabled) {
|
}) | rpl::start_with_next([=](bool enabled) {
|
||||||
cSetHideFilterEditButton(enabled);
|
cSetHideFilterEditButton(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
controller->reloadFiltersMenu();
|
controller->reloadFiltersMenu();
|
||||||
App::wnd()->fixOrder();
|
App::wnd()->fixOrder();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
@ -289,7 +289,7 @@ void SetupKotatoFolders(
|
||||||
return (enabled != cHideFilterNames());
|
return (enabled != cHideFilterNames());
|
||||||
}) | rpl::start_with_next([=](bool enabled) {
|
}) | rpl::start_with_next([=](bool enabled) {
|
||||||
cSetHideFilterNames(enabled);
|
cSetHideFilterNames(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
controller->reloadFiltersMenu();
|
controller->reloadFiltersMenu();
|
||||||
App::wnd()->fixOrder();
|
App::wnd()->fixOrder();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
@ -313,7 +313,7 @@ void SetupKotatoSystem(not_null<Ui::VerticalLayout*> container) {
|
||||||
return (enabled != cNoTaskbarFlashing());
|
return (enabled != cNoTaskbarFlashing());
|
||||||
}) | rpl::start_with_next([](bool enabled) {
|
}) | rpl::start_with_next([](bool enabled) {
|
||||||
cSetNoTaskbarFlashing(enabled);
|
cSetNoTaskbarFlashing(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddSkip(container);
|
AddSkip(container);
|
||||||
|
|
@ -335,7 +335,7 @@ void SetupKotatoOther(not_null<Ui::VerticalLayout*> container) {
|
||||||
return (enabled != cShowPhoneInDrawer());
|
return (enabled != cShowPhoneInDrawer());
|
||||||
}) | rpl::start_with_next([](bool enabled) {
|
}) | rpl::start_with_next([](bool enabled) {
|
||||||
cSetShowPhoneInDrawer(enabled);
|
cSetShowPhoneInDrawer(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddButton(
|
AddButton(
|
||||||
|
|
@ -349,7 +349,7 @@ void SetupKotatoOther(not_null<Ui::VerticalLayout*> container) {
|
||||||
return (enabled != cShowChatId());
|
return (enabled != cShowChatId());
|
||||||
}) | rpl::start_with_next([](bool enabled) {
|
}) | rpl::start_with_next([](bool enabled) {
|
||||||
cSetShowChatId(enabled);
|
cSetShowChatId(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddButton(
|
AddButton(
|
||||||
|
|
@ -363,7 +363,7 @@ void SetupKotatoOther(not_null<Ui::VerticalLayout*> container) {
|
||||||
return (enabled != cConfirmBeforeCall());
|
return (enabled != cConfirmBeforeCall());
|
||||||
}) | rpl::start_with_next([](bool enabled) {
|
}) | rpl::start_with_next([](bool enabled) {
|
||||||
cSetConfirmBeforeCall(enabled);
|
cSetConfirmBeforeCall(enabled);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddSkip(container);
|
AddSkip(container);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/widgets/popup_menu.h"
|
#include "ui/widgets/popup_menu.h"
|
||||||
#include "boxes/confirm_box.h"
|
#include "boxes/confirm_box.h"
|
||||||
#include "boxes/filters/edit_filter_box.h"
|
#include "boxes/filters/edit_filter_box.h"
|
||||||
#include "core/kotato_settings.h"
|
#include "kotato/json_settings.h"
|
||||||
#include "settings/settings_common.h"
|
#include "settings/settings_common.h"
|
||||||
#include "api/api_chat_filters.h"
|
#include "api/api_chat_filters.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
|
@ -351,7 +351,7 @@ void FiltersMenu::showAllMenu(QPoint position) {
|
||||||
void FiltersMenu::setDefaultFilter(FilterId id) {
|
void FiltersMenu::setDefaultFilter(FilterId id) {
|
||||||
if (cDefaultFilterId() != id) {
|
if (cDefaultFilterId() != id) {
|
||||||
cSetDefaultFilterId(id);
|
cSetDefaultFilterId(id);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -379,7 +379,7 @@ void FiltersMenu::remove(FilterId id) {
|
||||||
)).send();
|
)).send();
|
||||||
if (id == cDefaultFilterId()) {
|
if (id == cDefaultFilterId()) {
|
||||||
cSetDefaultFilterId(0);
|
cSetDefaultFilterId(0);
|
||||||
KotatoSettings::Write();
|
Kotato::JsonSettings::Write();
|
||||||
if (id == _session->activeChatsFilterCurrent()) {
|
if (id == _session->activeChatsFilterCurrent()) {
|
||||||
_session->setActiveChatsFilter(0);
|
_session->setActiveChatsFilter(0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue