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 2e5e83323..74bf4d615 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 c30630ffb..0fa663d88 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("")