mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Can update "allow posts from friends" setting
This commit is contained in:
@ -50,11 +50,13 @@ class __GeneralAccountSettingsBodyState
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AsyncScreenWidget(
|
||||
key: _key,
|
||||
onReload: () async =>
|
||||
_settings = await SettingsHelper.getGeneralSettings(),
|
||||
onBuild: _buildSettings,
|
||||
errorMessage: tr("Could not load general settings!"));
|
||||
key: _key,
|
||||
onReload: () async =>
|
||||
_settings = await SettingsHelper.getGeneralSettings(),
|
||||
onBuild: _buildSettings,
|
||||
errorMessage: tr("Could not load general settings!"),
|
||||
showOldDataWhileUpdating: true,
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSettings() {
|
||||
@ -166,6 +168,16 @@ class __GeneralAccountSettingsBodyState
|
||||
},
|
||||
switchValue: _settings.allowComments,
|
||||
),
|
||||
|
||||
// Allow posts from friends
|
||||
SettingsTile.switchTile(
|
||||
title: tr("Allow posts from your friends on your page"),
|
||||
onToggle: (v) {
|
||||
_settings.allowPostsFromFriends = v;
|
||||
_updateSettings();
|
||||
},
|
||||
switchValue: _settings.allowPostsFromFriends,
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user