1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Can delete custom emoji

This commit is contained in:
2020-04-29 17:22:34 +02:00
parent 5d432a5f87
commit 3cf9ee39d0
2 changed files with 30 additions and 1 deletions

View File

@ -125,7 +125,7 @@ class SettingsHelper {
.exec())
.isOK;
/// Upload a new emoji
/// Upload a new custom emoji
static Future<void> uploadNewCustomEmoji(NewEmoji newEmoji) async =>
(await APIRequest(
uri: "settings/upload_custom_emoji",
@ -134,4 +134,13 @@ class SettingsHelper {
.addFile("image", newEmoji.image)
.execWithFiles())
.assertOk();
/// Delete a custom emoji
///
/// Throws in case of failure
static Future<void> deleteCustomEmoji(int emojiID) async =>
(await APIRequest(uri: "settings/delete_custom_emoji", needLogin: true)
.addInt("emojiID", emojiID)
.exec())
.assertOk();
}