mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Can change account image visibility level
This commit is contained in:
@ -35,4 +35,19 @@ class SettingsHelper {
|
||||
.addFile("picture", newImage)
|
||||
.execWithFiles())
|
||||
.isOK;
|
||||
|
||||
/// Change account image visibility level
|
||||
static Future<bool> setAccountImageVisibilityLevel(
|
||||
AccountImageVisibilityLevels level) async =>
|
||||
(await APIRequest(
|
||||
uri: "settings/set_account_image_visibility", needLogin: true)
|
||||
.addString(
|
||||
"visibility",
|
||||
|
||||
// Find appropriate visibility level
|
||||
_APIAccountImageVisibilityAPILevels.entries
|
||||
.firstWhere((f) => f.value == level)
|
||||
.key)
|
||||
.exec())
|
||||
.isOK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user