mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Add blocked users box to Settings.
Start a general PeerListBox, it should replace both ContactsBox and MembersBox in the future. Show blocked users list in it.
This commit is contained in:
@@ -28,7 +28,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
#include "boxes/sessionsbox.h"
|
||||
#include "boxes/passcodebox.h"
|
||||
#include "boxes/autolockbox.h"
|
||||
#include "boxes/peer_list_box.h"
|
||||
#include "platform/platform_specific.h"
|
||||
#include "settings/settings_blocked_box_controller.h"
|
||||
|
||||
namespace Settings {
|
||||
|
||||
@@ -170,6 +172,7 @@ void PrivacyWidget::createControls() {
|
||||
style::margins marginSkip(0, 0, 0, st::settingsSkip);
|
||||
style::margins slidedPadding(0, marginSmall.bottom() / 2, 0, marginSmall.bottom() - (marginSmall.bottom() / 2));
|
||||
|
||||
addChildRow(_blockedUsers, marginSmall, lang(lng_settings_blocked_users), SLOT(onBlockedUsers()));
|
||||
addChildRow(_localPasscodeState, marginSmall);
|
||||
auto label = lang(psIdleSupported() ? lng_passcode_autolock_away : lng_passcode_autolock_inactive);
|
||||
auto value = (Global::AutoLock() % 3600) ? lng_passcode_autolock_minutes(lt_count, Global::AutoLock() / 60) : lng_passcode_autolock_hours(lt_count, Global::AutoLock() / 3600);
|
||||
@@ -192,6 +195,10 @@ void PrivacyWidget::autoLockUpdated() {
|
||||
}
|
||||
}
|
||||
|
||||
void PrivacyWidget::onBlockedUsers() {
|
||||
Ui::show(Box<PeerListBox>(std::make_unique<BlockedBoxController>()));
|
||||
}
|
||||
|
||||
void PrivacyWidget::onAutoLock() {
|
||||
Ui::show(Box<AutoLockBox>());
|
||||
}
|
||||
|
Reference in New Issue
Block a user