mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
fix: tray and serialization
This commit is contained in:
parent
ae3dfacdf9
commit
95f18f2120
3 changed files with 17 additions and 30 deletions
|
@ -221,6 +221,7 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(
|
||||||
localPremium,
|
localPremium,
|
||||||
copyUsernameAsLink,
|
copyUsernameAsLink,
|
||||||
appIcon,
|
appIcon,
|
||||||
|
simpleQuotesAndReplies,
|
||||||
deletedMark,
|
deletedMark,
|
||||||
editedMark,
|
editedMark,
|
||||||
recentStickersCount,
|
recentStickersCount,
|
||||||
|
|
|
@ -805,22 +805,6 @@ void Ayu::SetupCustomization(not_null<Ui::VerticalLayout *> container,
|
||||||
AyuSettings::save();
|
AyuSettings::save();
|
||||||
}, container->lifetime());
|
}, container->lifetime());
|
||||||
|
|
||||||
AddButton(
|
|
||||||
container,
|
|
||||||
tr::ayu_ShowGhostToggleInDrawer(),
|
|
||||||
st::settingsButtonNoIcon
|
|
||||||
)->toggleOn(
|
|
||||||
rpl::single(settings->showGhostToggleInDrawer)
|
|
||||||
)->toggledValue(
|
|
||||||
) | rpl::filter([=](bool enabled)
|
|
||||||
{
|
|
||||||
return (enabled != settings->showGhostToggleInDrawer);
|
|
||||||
}) | start_with_next([=](bool enabled)
|
|
||||||
{
|
|
||||||
settings->set_showGhostToggleInDrawer(enabled);
|
|
||||||
AyuSettings::save();
|
|
||||||
}, container->lifetime());
|
|
||||||
|
|
||||||
AddButton(
|
AddButton(
|
||||||
container,
|
container,
|
||||||
tr::ayu_SettingsShowMessageSeconds(),
|
tr::ayu_SettingsShowMessageSeconds(),
|
||||||
|
|
|
@ -102,6 +102,7 @@ void Tray::rebuildMenu() {
|
||||||
|
|
||||||
auto settings = &AyuSettings::getInstance();
|
auto settings = &AyuSettings::getInstance();
|
||||||
|
|
||||||
|
if (settings->showGhostToggleInTray) {
|
||||||
auto turnGhostModeText = _textUpdates.events(
|
auto turnGhostModeText = _textUpdates.events(
|
||||||
) | rpl::map([=]
|
) | rpl::map([=]
|
||||||
{
|
{
|
||||||
|
@ -119,6 +120,7 @@ void Tray::rebuildMenu() {
|
||||||
|
|
||||||
AyuSettings::save();
|
AyuSettings::save();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (settings->showStreamerToggleInTray) {
|
if (settings->showStreamerToggleInTray) {
|
||||||
auto turnStreamerModeText = _textUpdates.events(
|
auto turnStreamerModeText = _textUpdates.events(
|
||||||
|
|
Loading…
Add table
Reference in a new issue