mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 08:55:59 +00:00
@@ -565,6 +565,7 @@ void SetupNotificationsContent(not_null<Ui::VerticalLayout*> container) {
|
||||
AddDivider(container);
|
||||
AddSkip(container, st::settingsCheckboxesSkip);
|
||||
AddSubsectionTitle(container, lng_settings_events_title);
|
||||
|
||||
const auto joined = addCheckbox(
|
||||
lng_settings_events_joined,
|
||||
!Auth().api().contactSignupSilentCurrent().value_or(false));
|
||||
@@ -580,6 +581,21 @@ void SetupNotificationsContent(not_null<Ui::VerticalLayout*> container) {
|
||||
Auth().api().saveContactSignupSilent(!enabled);
|
||||
}, joined->lifetime());
|
||||
|
||||
const auto pinned = addCheckbox(
|
||||
lng_settings_events_pinned,
|
||||
Auth().settings().notifyAboutPinned());
|
||||
Auth().settings().notifyAboutPinnedChanges(
|
||||
) | rpl::start_with_next([=](bool notify) {
|
||||
pinned->setChecked(notify);
|
||||
}, pinned->lifetime());
|
||||
pinned->checkedChanges(
|
||||
) | rpl::filter([](bool notify) {
|
||||
return (notify != Auth().settings().notifyAboutPinned());
|
||||
}) | rpl::start_with_next([=](bool notify) {
|
||||
Auth().settings().setNotifyAboutPinned(notify);
|
||||
Auth().saveSettingsDelayed();
|
||||
}, joined->lifetime());
|
||||
|
||||
const auto nativeKey = [&] {
|
||||
if (!Platform::Notifications::Supported()) {
|
||||
return LangKey();
|
||||
|
Reference in New Issue
Block a user