Reorder privacy buttons like on Android.

This commit is contained in:
John Preston 2022-12-29 14:57:27 +04:00
parent eebe1f4c11
commit 27228480a8
1 changed files with 12 additions and 12 deletions

View File

@ -280,22 +280,27 @@ void SetupPrivacy(
{ &st::settingsIconOnline, kIconLightBlue },
Key::LastSeen,
[=] { return std::make_unique<LastSeenPrivacyController>(session); });
add(
tr::lng_settings_profile_photo_privacy(),
{ &st::settingsIconAccount, kIconRed },
Key::ProfilePhoto,
[] { return std::make_unique<ProfilePhotoPrivacyController>(); });
add(
tr::lng_settings_forwards_privacy(),
{ &st::settingsIconForward, kIconLightOrange },
Key::Forwards,
[=] { return std::make_unique<ForwardsPrivacyController>(
controller); });
add(
tr::lng_settings_profile_photo_privacy(),
{ &st::settingsIconAccount, kIconRed },
Key::ProfilePhoto,
[] { return std::make_unique<ProfilePhotoPrivacyController>(); });
add(
tr::lng_settings_calls(),
{ &st::settingsIconVideoCalls, kIconGreen },
Key::Calls,
[] { return std::make_unique<CallsPrivacyController>(); });
add(
tr::lng_settings_groups_invite(),
{ &st::settingsIconGroup, kIconDarkBlue },
Key::Invites,
[] { return std::make_unique<GroupsInvitePrivacyController>(); });
AddPremiumPrivacyButton(
controller,
container,
@ -303,16 +308,11 @@ void SetupPrivacy(
{ &st::settingsPremiumIconVoice, kIconRed },
Key::Voices,
[=] { 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);
AddSkip(container, st::settingsPrivacySecurityPadding);
AddDividerText(container, tr::lng_settings_group_privacy_about());
AddDivider(container);
}
void SetupArchiveAndMute(
@ -865,10 +865,10 @@ void PrivacySecurity::setupContent(
return rpl::duplicate(updateOnTick);
};
SetupPrivacy(controller, content, trigger());
SetupSecurity(controller, content, trigger(), [=](Type type) {
_showOther.fire_copy(type);
});
SetupPrivacy(controller, content, trigger());
#if !defined OS_MAC_STORE && !defined OS_WIN_STORE
SetupSensitiveContent(controller, content, trigger());
#else // !OS_MAC_STORE && !OS_WIN_STORE