mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Revert "Move Blocked users to Privacy in Settings."
This reverts commit 1acfe441e1
.
This commit is contained in:
parent
5d5e4cbdff
commit
eebe1f4c11
2 changed files with 21 additions and 34 deletions
|
@ -397,11 +397,7 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
|||
tr::lng_info_mobile_label(),
|
||||
PhoneOrHiddenValue(user),
|
||||
tr::lng_profile_copy_phone(tr::now)).text;
|
||||
using namespace Ui;
|
||||
const auto hook = [=](FlatLabel::ContextMenuRequest request) {
|
||||
if (user->phone().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
const auto hook = [=](Ui::FlatLabel::ContextMenuRequest request) {
|
||||
phoneLabel->fillContextMenu(request);
|
||||
AddPhoneMenu(request.menu, user);
|
||||
};
|
||||
|
|
|
@ -246,28 +246,15 @@ rpl::producer<int> BlockedPeersCount(not_null<::Main::Session*> session) {
|
|||
});
|
||||
}
|
||||
|
||||
void SetupBlockedList(
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
rpl::producer<> updateTrigger,
|
||||
Fn<void(Type)> showOther);
|
||||
|
||||
void SetupPrivacy(
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
rpl::producer<> updateTrigger,
|
||||
Fn<void(Type)> showOther) {
|
||||
rpl::producer<> updateTrigger) {
|
||||
AddSkip(container, st::settingsPrivacySkip);
|
||||
AddSubsectionTitle(container, tr::lng_settings_privacy_title());
|
||||
|
||||
const auto session = &controller->session();
|
||||
|
||||
SetupBlockedList(
|
||||
controller,
|
||||
container,
|
||||
rpl::duplicate(updateTrigger),
|
||||
showOther);
|
||||
|
||||
using Key = Privacy::Key;
|
||||
const auto add = [&](
|
||||
rpl::producer<QString> label,
|
||||
|
@ -293,27 +280,22 @@ 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,
|
||||
|
@ -321,11 +303,16 @@ 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);
|
||||
AddDivider(container);
|
||||
AddDividerText(container, tr::lng_settings_group_privacy_about());
|
||||
}
|
||||
|
||||
void SetupArchiveAndMute(
|
||||
|
@ -721,6 +708,11 @@ void SetupSecurity(
|
|||
AddSkip(container, st::settingsPrivacySkip);
|
||||
AddSubsectionTitle(container, tr::lng_settings_security());
|
||||
|
||||
SetupBlockedList(
|
||||
controller,
|
||||
container,
|
||||
rpl::duplicate(updateTrigger),
|
||||
showOther);
|
||||
SetupSessionsList(
|
||||
controller,
|
||||
container,
|
||||
|
@ -873,11 +865,10 @@ void PrivacySecurity::setupContent(
|
|||
return rpl::duplicate(updateOnTick);
|
||||
};
|
||||
|
||||
const auto showOther = [=](Type type) {
|
||||
SetupPrivacy(controller, content, trigger());
|
||||
SetupSecurity(controller, content, trigger(), [=](Type type) {
|
||||
_showOther.fire_copy(type);
|
||||
};
|
||||
SetupPrivacy(controller, content, trigger(), showOther);
|
||||
SetupSecurity(controller, content, trigger(), showOther);
|
||||
});
|
||||
#if !defined OS_MAC_STORE && !defined OS_WIN_STORE
|
||||
SetupSensitiveContent(controller, content, trigger());
|
||||
#else // !OS_MAC_STORE && !OS_WIN_STORE
|
||||
|
|
Loading…
Add table
Reference in a new issue