mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Reorder privacy buttons like on Android.
This commit is contained in:
parent
eebe1f4c11
commit
27228480a8
1 changed files with 12 additions and 12 deletions
|
@ -280,22 +280,27 @@ void SetupPrivacy(
|
||||||
{ &st::settingsIconOnline, kIconLightBlue },
|
{ &st::settingsIconOnline, kIconLightBlue },
|
||||||
Key::LastSeen,
|
Key::LastSeen,
|
||||||
[=] { return std::make_unique<LastSeenPrivacyController>(session); });
|
[=] { return std::make_unique<LastSeenPrivacyController>(session); });
|
||||||
|
add(
|
||||||
|
tr::lng_settings_profile_photo_privacy(),
|
||||||
|
{ &st::settingsIconAccount, kIconRed },
|
||||||
|
Key::ProfilePhoto,
|
||||||
|
[] { return std::make_unique<ProfilePhotoPrivacyController>(); });
|
||||||
add(
|
add(
|
||||||
tr::lng_settings_forwards_privacy(),
|
tr::lng_settings_forwards_privacy(),
|
||||||
{ &st::settingsIconForward, kIconLightOrange },
|
{ &st::settingsIconForward, kIconLightOrange },
|
||||||
Key::Forwards,
|
Key::Forwards,
|
||||||
[=] { return std::make_unique<ForwardsPrivacyController>(
|
[=] { return std::make_unique<ForwardsPrivacyController>(
|
||||||
controller); });
|
controller); });
|
||||||
add(
|
|
||||||
tr::lng_settings_profile_photo_privacy(),
|
|
||||||
{ &st::settingsIconAccount, kIconRed },
|
|
||||||
Key::ProfilePhoto,
|
|
||||||
[] { return std::make_unique<ProfilePhotoPrivacyController>(); });
|
|
||||||
add(
|
add(
|
||||||
tr::lng_settings_calls(),
|
tr::lng_settings_calls(),
|
||||||
{ &st::settingsIconVideoCalls, kIconGreen },
|
{ &st::settingsIconVideoCalls, kIconGreen },
|
||||||
Key::Calls,
|
Key::Calls,
|
||||||
[] { return std::make_unique<CallsPrivacyController>(); });
|
[] { return std::make_unique<CallsPrivacyController>(); });
|
||||||
|
add(
|
||||||
|
tr::lng_settings_groups_invite(),
|
||||||
|
{ &st::settingsIconGroup, kIconDarkBlue },
|
||||||
|
Key::Invites,
|
||||||
|
[] { return std::make_unique<GroupsInvitePrivacyController>(); });
|
||||||
AddPremiumPrivacyButton(
|
AddPremiumPrivacyButton(
|
||||||
controller,
|
controller,
|
||||||
container,
|
container,
|
||||||
|
@ -303,16 +308,11 @@ void SetupPrivacy(
|
||||||
{ &st::settingsPremiumIconVoice, kIconRed },
|
{ &st::settingsPremiumIconVoice, kIconRed },
|
||||||
Key::Voices,
|
Key::Voices,
|
||||||
[=] { return std::make_unique<VoicesPrivacyController>(session); });
|
[=] { return std::make_unique<VoicesPrivacyController>(session); });
|
||||||
add(
|
|
||||||
tr::lng_settings_groups_invite(),
|
|
||||||
{ &st::settingsIconGroup, kIconDarkBlue },
|
|
||||||
Key::Invites,
|
|
||||||
[] { return std::make_unique<GroupsInvitePrivacyController>(); });
|
|
||||||
|
|
||||||
session->api().userPrivacy().reload(Api::UserPrivacy::Key::AddedByPhone);
|
session->api().userPrivacy().reload(Api::UserPrivacy::Key::AddedByPhone);
|
||||||
|
|
||||||
AddSkip(container, st::settingsPrivacySecurityPadding);
|
AddSkip(container, st::settingsPrivacySecurityPadding);
|
||||||
AddDividerText(container, tr::lng_settings_group_privacy_about());
|
AddDivider(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupArchiveAndMute(
|
void SetupArchiveAndMute(
|
||||||
|
@ -865,10 +865,10 @@ void PrivacySecurity::setupContent(
|
||||||
return rpl::duplicate(updateOnTick);
|
return rpl::duplicate(updateOnTick);
|
||||||
};
|
};
|
||||||
|
|
||||||
SetupPrivacy(controller, content, trigger());
|
|
||||||
SetupSecurity(controller, content, trigger(), [=](Type type) {
|
SetupSecurity(controller, content, trigger(), [=](Type type) {
|
||||||
_showOther.fire_copy(type);
|
_showOther.fire_copy(type);
|
||||||
});
|
});
|
||||||
|
SetupPrivacy(controller, content, trigger());
|
||||||
#if !defined OS_MAC_STORE && !defined OS_WIN_STORE
|
#if !defined OS_MAC_STORE && !defined OS_WIN_STORE
|
||||||
SetupSensitiveContent(controller, content, trigger());
|
SetupSensitiveContent(controller, content, trigger());
|
||||||
#else // !OS_MAC_STORE && !OS_WIN_STORE
|
#else // !OS_MAC_STORE && !OS_WIN_STORE
|
||||||
|
|
Loading…
Add table
Reference in a new issue