mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-25 06:25:40 +03:00
Only display delete icon when user avatar is selected
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
44e87dbd42
commit
317f745806
1 changed files with 14 additions and 10 deletions
|
@ -209,7 +209,8 @@ fun ConversationCreationScreen(
|
||||||
imagePickerLauncher = imagePickerLauncher,
|
imagePickerLauncher = imagePickerLauncher,
|
||||||
remoteFilePickerLauncher = remoteFilePickerLauncher,
|
remoteFilePickerLauncher = remoteFilePickerLauncher,
|
||||||
cameraLauncher = cameraLauncher,
|
cameraLauncher = cameraLauncher,
|
||||||
onDeleteImage = { selectedImageUri = null }
|
onDeleteImage = { selectedImageUri = null },
|
||||||
|
selectedImageUri = selectedImageUri
|
||||||
)
|
)
|
||||||
|
|
||||||
ConversationNameAndDescription(conversationCreationViewModel)
|
ConversationNameAndDescription(conversationCreationViewModel)
|
||||||
|
@ -258,7 +259,8 @@ fun UploadAvatar(
|
||||||
imagePickerLauncher: ManagedActivityResultLauncher<Intent, ActivityResult>,
|
imagePickerLauncher: ManagedActivityResultLauncher<Intent, ActivityResult>,
|
||||||
remoteFilePickerLauncher: ManagedActivityResultLauncher<Intent, ActivityResult>,
|
remoteFilePickerLauncher: ManagedActivityResultLauncher<Intent, ActivityResult>,
|
||||||
cameraLauncher: ManagedActivityResultLauncher<Intent, ActivityResult>,
|
cameraLauncher: ManagedActivityResultLauncher<Intent, ActivityResult>,
|
||||||
onDeleteImage: () -> Unit
|
onDeleteImage: () -> Unit,
|
||||||
|
selectedImageUri: Uri?
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
@ -299,14 +301,16 @@ fun UploadAvatar(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
IconButton(onClick = {
|
if (selectedImageUri != null) {
|
||||||
onDeleteImage()
|
IconButton(onClick = {
|
||||||
}) {
|
onDeleteImage()
|
||||||
Icon(
|
}) {
|
||||||
painter = painterResource(id = R.drawable.ic_delete_grey600_24dp),
|
Icon(
|
||||||
contentDescription = null,
|
painter = painterResource(id = R.drawable.ic_delete_grey600_24dp),
|
||||||
modifier = Modifier.size(24.dp)
|
contentDescription = null,
|
||||||
)
|
modifier = Modifier.size(24.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue