Skip to content

Commit

Permalink
rename variable selectedImageUri
Browse files Browse the repository at this point in the history
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
  • Loading branch information
sowjanyakch committed Sep 20, 2024
1 parent 38e07e0 commit bd47cca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class ConversationCreationViewModel @Inject constructor(
val selectedParticipants: StateFlow<List<AutocompleteUser>> = _selectedParticipants
private val roomViewState = MutableStateFlow<RoomUIState>(RoomUIState.None)

private val selectedImageUri = MutableStateFlow<Uri?>(null)
val selectedImageUriState: StateFlow<Uri?> = selectedImageUri
private val _selectedImageUri = MutableStateFlow<Uri?>(null)
val selectedImageUri: StateFlow<Uri?> = _selectedImageUri

private val _currentUser = userManager.currentUser.blockingGet()
val currentUser: User = _currentUser
Expand All @@ -43,7 +43,7 @@ class ConversationCreationViewModel @Inject constructor(
}

fun updateSelectedImageUri(uri: Uri?) {
selectedImageUri.value = uri
_selectedImageUri.value = uri
}

private val _roomName = MutableStateFlow("")
Expand Down

0 comments on commit bd47cca

Please sign in to comment.