mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Can update posts visibility levels
This commit is contained in:
@ -69,6 +69,19 @@ class PostsHelper {
|
||||
.isOK;
|
||||
}
|
||||
|
||||
/// Update a post visibility
|
||||
Future<bool> setVisibility(int id, PostVisibilityLevel level) async {
|
||||
return (await APIRequest(
|
||||
uri: "posts/set_visibility_level",
|
||||
needLogin: true,
|
||||
args: {
|
||||
"postID": id.toString(),
|
||||
"new_level": _APIPostsVisibilityLevelMap.map((k, v) => MapEntry(v, k))[level]
|
||||
},
|
||||
).exec())
|
||||
.isOK;
|
||||
}
|
||||
|
||||
/// Delete a post
|
||||
Future<bool> delete(int id) async {
|
||||
return (await APIRequest(
|
||||
|
Reference in New Issue
Block a user