From bd47ccab0f00216222e76e5ab648ba06cfbc45d0 Mon Sep 17 00:00:00 2001 From: sowjanyakch Date: Fri, 20 Sep 2024 16:07:43 +0200 Subject: [PATCH] rename variable selectedImageUri Signed-off-by: sowjanyakch --- .../conversationcreation/ConversationCreationActivity.kt | 2 +- .../conversationcreation/ConversationCreationViewModel.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt index 2e5e833238..74bf4d6150 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt @@ -138,7 +138,7 @@ fun ConversationCreationScreen( context: Context, pickImage: PickImage ) { - val selectedImageUri = conversationCreationViewModel.selectedImageUriState.collectAsState().value + val selectedImageUri = conversationCreationViewModel.selectedImageUri.collectAsState().value val imagePickerLauncher = rememberLauncherForActivityResult( contract = ActivityResultContracts.StartActivityForResult() diff --git a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt index c30630ffba..0fa663d889 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt @@ -32,8 +32,8 @@ class ConversationCreationViewModel @Inject constructor( val selectedParticipants: StateFlow> = _selectedParticipants private val roomViewState = MutableStateFlow(RoomUIState.None) - private val selectedImageUri = MutableStateFlow(null) - val selectedImageUriState: StateFlow = selectedImageUri + private val _selectedImageUri = MutableStateFlow(null) + val selectedImageUri: StateFlow = _selectedImageUri private val _currentUser = userManager.currentUser.blockingGet() val currentUser: User = _currentUser @@ -43,7 +43,7 @@ class ConversationCreationViewModel @Inject constructor( } fun updateSelectedImageUri(uri: Uri?) { - selectedImageUri.value = uri + _selectedImageUri.value = uri } private val _roomName = MutableStateFlow("")