mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Can upload new custom emojies
This commit is contained in:
		@@ -4,6 +4,7 @@ import 'package:comunic/enums/user_page_visibility.dart';
 | 
			
		||||
import 'package:comunic/models/account_image_settings.dart';
 | 
			
		||||
import 'package:comunic/models/api_request.dart';
 | 
			
		||||
import 'package:comunic/models/general_settings.dart';
 | 
			
		||||
import 'package:comunic/models/new_emoji.dart';
 | 
			
		||||
 | 
			
		||||
/// Settings helper
 | 
			
		||||
///
 | 
			
		||||
@@ -123,4 +124,14 @@ class SettingsHelper {
 | 
			
		||||
      (await APIRequest(uri: "settings/delete_account_image", needLogin: true)
 | 
			
		||||
              .exec())
 | 
			
		||||
          .isOK;
 | 
			
		||||
 | 
			
		||||
  /// Upload a new emoji
 | 
			
		||||
  static Future<void> uploadNewCustomEmoji(NewEmoji newEmoji) async =>
 | 
			
		||||
      (await APIRequest(
 | 
			
		||||
                  uri: "settings/upload_custom_emoji",
 | 
			
		||||
                  needLogin: true,
 | 
			
		||||
                  args: {"shortcut": newEmoji.shortcut})
 | 
			
		||||
              .addFile("image", newEmoji.image)
 | 
			
		||||
              .execWithFiles())
 | 
			
		||||
          .assertOk();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -73,7 +73,8 @@ class UsersHelper {
 | 
			
		||||
  /// of failure
 | 
			
		||||
  Future<UsersList> getListWithThrow(Set<int> users,
 | 
			
		||||
      {bool forceDownload = false}) async {
 | 
			
		||||
    final list = await getUsersInfo(users.toList());
 | 
			
		||||
    final list =
 | 
			
		||||
        await getUsersInfo(users.toList(), forceDownload: forceDownload);
 | 
			
		||||
 | 
			
		||||
    if (list == null)
 | 
			
		||||
      throw Exception(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user