mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 21:09:21 +00:00
Can change group posts creation level
This commit is contained in:
parent
d6f2df7002
commit
f450a46e99
@ -27,7 +27,7 @@ class Group {
|
|||||||
GroupMembershipLevel membershipLevel;
|
GroupMembershipLevel membershipLevel;
|
||||||
GroupVisibilityLevel visibilityLevel;
|
GroupVisibilityLevel visibilityLevel;
|
||||||
GroupRegistrationLevel registrationLevel;
|
GroupRegistrationLevel registrationLevel;
|
||||||
final GroupPostCreationLevel postCreationLevel;
|
GroupPostCreationLevel postCreationLevel;
|
||||||
String virtualDirectory;
|
String virtualDirectory;
|
||||||
bool following;
|
bool following;
|
||||||
|
|
||||||
|
@ -184,9 +184,25 @@ class _GroupSettingsScreenState extends SafeState<GroupSettingsScreen> {
|
|||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
List<MultiChoiceEntry<GroupPostCreationLevel>> get _postsCreationLevels => [
|
||||||
|
MultiChoiceEntry(
|
||||||
|
id: GroupPostCreationLevel.MEMBERS,
|
||||||
|
title: tr("All members"),
|
||||||
|
subtitle:
|
||||||
|
tr("All the members of the group can create posts on the group"),
|
||||||
|
),
|
||||||
|
MultiChoiceEntry(
|
||||||
|
id: GroupPostCreationLevel.MODERATORS,
|
||||||
|
title: tr("Moderators only"),
|
||||||
|
subtitle: tr(
|
||||||
|
"Only moderators and administrators of the group can create posts on it"),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
|
||||||
Widget _buildAccessRestrictions() => SettingsSection(
|
Widget _buildAccessRestrictions() => SettingsSection(
|
||||||
title: tr("Access restrictions"),
|
title: tr("Access restrictions"),
|
||||||
tiles: [
|
tiles: [
|
||||||
|
// Group visibility
|
||||||
MultiChoicesSettingsTile(
|
MultiChoicesSettingsTile(
|
||||||
title: tr("Group visibility"),
|
title: tr("Group visibility"),
|
||||||
choices: _visibilityLevels,
|
choices: _visibilityLevels,
|
||||||
@ -195,6 +211,8 @@ class _GroupSettingsScreenState extends SafeState<GroupSettingsScreen> {
|
|||||||
_groupSettings.visibilityLevel = v;
|
_groupSettings.visibilityLevel = v;
|
||||||
_updateSettings();
|
_updateSettings();
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
// Group registration level
|
||||||
MultiChoicesSettingsTile(
|
MultiChoicesSettingsTile(
|
||||||
title: tr("Group registration level"),
|
title: tr("Group registration level"),
|
||||||
choices: _registrationLevels,
|
choices: _registrationLevels,
|
||||||
@ -203,6 +221,16 @@ class _GroupSettingsScreenState extends SafeState<GroupSettingsScreen> {
|
|||||||
_groupSettings.registrationLevel = v;
|
_groupSettings.registrationLevel = v;
|
||||||
_updateSettings();
|
_updateSettings();
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
// Group posts creation levels
|
||||||
|
MultiChoicesSettingsTile(
|
||||||
|
title: tr("Posts creation level"),
|
||||||
|
choices: _postsCreationLevels,
|
||||||
|
currentValue: _groupSettings.postCreationLevel,
|
||||||
|
onChanged: (s) {
|
||||||
|
_groupSettings.postCreationLevel = s;
|
||||||
|
_updateSettings();
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user