From 9e5decae619fc33a12c12a32ca3a2ed3a20a2ffc Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 27 Apr 2020 18:51:54 +0200 Subject: [PATCH] Update comments on user page switch --- lib/models/general_settings.dart | 2 +- .../account_settings/general_account_settings.dart | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/models/general_settings.dart b/lib/models/general_settings.dart index f68b0e5..9008e03 100644 --- a/lib/models/general_settings.dart +++ b/lib/models/general_settings.dart @@ -10,7 +10,7 @@ class GeneralSettings { String firstName; String lastName; UserPageVisibility pageVisibility; - final bool allowComments; + bool allowComments; final bool allowPostsFromFriends; bool allowComunicEmails; final bool publicFriendsList; diff --git a/lib/ui/routes/account_settings/general_account_settings.dart b/lib/ui/routes/account_settings/general_account_settings.dart index 24da681..5a41f6c 100644 --- a/lib/ui/routes/account_settings/general_account_settings.dart +++ b/lib/ui/routes/account_settings/general_account_settings.dart @@ -156,6 +156,16 @@ class __GeneralAccountSettingsBodyState _updateSettings(); }, ), + + // Allow comments on user page ? + SettingsTile.switchTile( + title: tr("Allow comments on your page"), + onToggle: (v) { + _settings.allowComments = v; + _updateSettings(); + }, + switchValue: _settings.allowComments, + ), ]; }