From 2c8c1b97167e8f32ed012c68f9195723c92ebcf7 Mon Sep 17 00:00:00 2001 From: aderan Date: Mon, 4 Sep 2023 14:26:11 +0800 Subject: [PATCH] update code for displaying photo images --- app/src/main/java/io/agora/flat/Constants.kt | 2 ++ .../io/agora/flat/ui/activity/play/ClassCloudViewModel.kt | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/agora/flat/Constants.kt b/app/src/main/java/io/agora/flat/Constants.kt index 8f71d223..23fe6c40 100644 --- a/app/src/main/java/io/agora/flat/Constants.kt +++ b/app/src/main/java/io/agora/flat/Constants.kt @@ -5,6 +5,8 @@ class Constants { const val DEFAULT_CALLING_CODE = "+86" const val UPLOAD_TAG_CLOUD = "cloud" + + const val UPLOAD_TAG_TAKE_PHOTO = "take_photo" } object URL { diff --git a/app/src/main/java/io/agora/flat/ui/activity/play/ClassCloudViewModel.kt b/app/src/main/java/io/agora/flat/ui/activity/play/ClassCloudViewModel.kt index fc11fc09..0fa85442 100644 --- a/app/src/main/java/io/agora/flat/ui/activity/play/ClassCloudViewModel.kt +++ b/app/src/main/java/io/agora/flat/ui/activity/play/ClassCloudViewModel.kt @@ -88,7 +88,7 @@ class ClassCloudViewModel @Inject constructor( } viewModelScope.launch { - UploadManager.observeSuccess(Constants.UPLOAD_TAG_CLOUD).collect { + UploadManager.observeSuccess(Constants.UPLOAD_TAG_TAKE_PHOTO).collect { handleUploadSuccess(it) } } @@ -192,7 +192,7 @@ class ClassCloudViewModel @Inject constructor( mediaType = info.mediaType, uri = info.uri, - tag = Constants.UPLOAD_TAG_CLOUD, + tag = Constants.UPLOAD_TAG_TAKE_PHOTO, ) uploadingFiles[data.fileUUID] = data UploadManager.upload(request)