2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Show 'None' if no users are blocked.

This commit is contained in:
John Preston
2019-07-15 10:58:43 +02:00
parent 90fb9eccd4
commit 77b8d56c03
2 changed files with 6 additions and 3 deletions

View File

@@ -105,9 +105,11 @@ void SetupPrivacy(not_null<Ui::VerticalLayout*> container) {
AddSkip(container, st::settingsPrivacySkip);
AddSubsectionTitle(container, tr::lng_settings_privacy_title());
auto count = BlockedUsersCount(
) | rpl::map([](int count) {
return count ? QString::number(count) : QString();
auto count = rpl::combine(
BlockedUsersCount(),
tr::lng_settings_no_blocked_users()
) | rpl::map([](int count, const QString &none) {
return count ? QString::number(count) : none;
});
AddButtonWithLabel(
container,