Modified to insert sticker into DB even if thumbnail is null 79/229479/1
authorInHong Han <inhong1.han@samsung.com>
Wed, 1 Apr 2020 08:02:39 +0000 (17:02 +0900)
committerInHong Han <inhong1.han@samsung.com>
Wed, 1 Apr 2020 08:02:39 +0000 (17:02 +0900)
Change-Id: I7a00974f21ee33908cc84b2e14577c9e74b94ec4

receiver/src/ft.cpp

index 461b596..2107d32 100644 (file)
@@ -196,11 +196,11 @@ static void _on_send_completed(sap_file_transaction_h file_transaction,
                 if (ret != THUMBNAIL_UTIL_ERROR_NONE) {
                     LOGE("Failed to create thumbnail. msg : %s", get_error_message(ret));
                     sticker_data.thumbnail_path.clear();
-                } else {
-                    insert_sticker_data(sticker_data.file_path.c_str(), sticker_data.keyword.c_str(), sticker_data.group.c_str(), sticker_data.description.c_str(), sticker_data.thumbnail_path.c_str());
-                    destroy_sticker_provider_handle();
                 }
 
+                insert_sticker_data(sticker_data.file_path.c_str(), sticker_data.keyword.c_str(), sticker_data.group.c_str(), sticker_data.description.c_str(), sticker_data.thumbnail_path.c_str());
+                destroy_sticker_provider_handle();
+
                 if (unlink(sticker_data.file_path.c_str()) == -1)
                     LOGE("Failed to remove sticker file");