diff --git a/tests/test_android_replies.c b/tests/test_android_replies.c index abe981b9b..553332772 100644 --- a/tests/test_android_replies.c +++ b/tests/test_android_replies.c @@ -66,7 +66,7 @@ static int check_encrypted_attachment(const char* channel, const char* directory snprintf(req->source, sizeof(req->source), "%s", source); snprintf(req->info.name, sizeof(req->info.name), "Секрет | 😀.png"); snprintf(req->content_type, sizeof(req->content_type), "image/png"); - req->info.kind = ATTACHMENT_FILE; + req->info.kind = ATTACHMENT_PNG; req->info.width = 1080; req->info.height = 1920; attachment_send_trampoline(req); REQUIRE(wait_result(10) == 1); sqlite3_stmt* st = NULL; uint8_t id[32]; REQUIRE(sqlite3_prepare_v2(instance->topo_sqlite_db, "SELECT message_id FROM attachment_keys", -1, &st, NULL) == SQLITE_OK); @@ -78,8 +78,8 @@ static int check_encrypted_attachment(const char* channel, const char* directory REQUIRE(!extract(json, "$[0].contentType", value, sizeof(value)) && !strcmp(value, "image/png")); REQUIRE(!extract(json, "$[0].filePath", value, sizeof(value)) && !access(value, F_OK) && !strstr(value, ".uenc")); REQUIRE(!extract(json, "$[0].fileSize", value, sizeof(value)) && !strcmp(value, "13")); - REQUIRE(!extract(json, "$[0].width", value, sizeof(value)) && !strcmp(value, "0")); - REQUIRE(!extract(json, "$[0].height", value, sizeof(value)) && !strcmp(value, "0")); u_free(json); + REQUIRE(!extract(json, "$[0].width", value, sizeof(value)) && !strcmp(value, "1080")); + REQUIRE(!extract(json, "$[0].height", value, sizeof(value)) && !strcmp(value, "1920")); u_free(json); json = utun_bridge_get_channels_json(); REQUIRE(json); REQUIRE(!extract(json, "$[0].lastMsgEncrypted", value, sizeof(value)) && !strcmp(value, "1")); REQUIRE(!strstr(json, ".uenc")); u_free(json); diff --git a/tools/chatgui-android/app/src/main/java/com/utun/chat/viewmodel/ChatViewModel.kt b/tools/chatgui-android/app/src/main/java/com/utun/chat/viewmodel/ChatViewModel.kt index 8834e1af3..a5253d128 100644 --- a/tools/chatgui-android/app/src/main/java/com/utun/chat/viewmodel/ChatViewModel.kt +++ b/tools/chatgui-android/app/src/main/java/com/utun/chat/viewmodel/ChatViewModel.kt @@ -3,7 +3,6 @@ package com.utun.chat.viewmodel import com.utun.chat.R import com.utun.chat.data.AppLanguage import android.content.Context -import android.graphics.BitmapFactory import android.media.MediaMetadataRetriever import android.net.Uri import android.util.Log