1
0
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:
2020-04-16 19:30:25 +02:00
parent 8feea380a4
commit 6e0f6d1d79
2 changed files with 69 additions and 1 deletions

View File

@ -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;
}