mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Show "Auto mute and archive new" for premium users.
This commit is contained in:
parent
490f6f7e50
commit
59be3d746c
1 changed files with 11 additions and 6 deletions
|
@ -46,6 +46,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "data/data_chat.h"
|
#include "data/data_chat.h"
|
||||||
#include "data/data_channel.h"
|
#include "data/data_channel.h"
|
||||||
|
#include "data/data_peer_values.h"
|
||||||
#include "main/main_domain.h"
|
#include "main/main_domain.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "storage/storage_domain.h"
|
#include "storage/storage_domain.h"
|
||||||
|
@ -215,13 +216,17 @@ void SetupArchiveAndMute(
|
||||||
AddSkip(inner);
|
AddSkip(inner);
|
||||||
AddDividerText(inner, tr::lng_settings_auto_archive_about());
|
AddDividerText(inner, tr::lng_settings_auto_archive_about());
|
||||||
|
|
||||||
using namespace rpl::mappers;
|
auto shown = rpl::single(
|
||||||
wrap->toggleOn(rpl::single(
|
|
||||||
false
|
false
|
||||||
) | rpl::then(
|
) | rpl::then(session->api().globalPrivacy().showArchiveAndMute(
|
||||||
session->api().globalPrivacy().showArchiveAndMute(
|
) | rpl::filter(_1) | rpl::take(1));
|
||||||
) | rpl::filter(_1) | rpl::take(1)
|
auto premium = Data::AmPremiumValue(&controller->session());
|
||||||
));
|
|
||||||
|
using namespace rpl::mappers;
|
||||||
|
wrap->toggleOn(rpl::combine(
|
||||||
|
std::move(shown),
|
||||||
|
std::move(premium),
|
||||||
|
_1 || _2));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupLocalPasscode(
|
void SetupLocalPasscode(
|
||||||
|
|
Loading…
Add table
Reference in a new issue