fix: close both message context sheets smoothly

Signed-off-by: Infi <wingit@geist.ga>
This commit is contained in:
Infi 2023-06-15 16:11:44 +02:00
parent 7377d540cd
commit 5db3d6f401
1 changed files with 13 additions and 0 deletions

View File

@ -100,6 +100,7 @@ fun MessageContextSheet(
) {
if (message.content.isNullOrEmpty()) {
coroutineScope.launch {
shareSheetState.hide()
onHideSheet()
Toast.makeText(
context,
@ -116,6 +117,9 @@ fun MessageContextSheet(
Toast.LENGTH_SHORT
).show()
coroutineScope.launch {
shareSheetState.hide()
}
coroutineScope.launch {
clipboardManager.setText(AnnotatedString(message.content))
onHideSheet()
@ -144,6 +148,9 @@ fun MessageContextSheet(
Toast.LENGTH_SHORT
).show()
coroutineScope.launch {
shareSheetState.hide()
}
coroutineScope.launch {
onHideSheet()
}
@ -164,6 +171,9 @@ fun MessageContextSheet(
Toast.LENGTH_SHORT
).show()
coroutineScope.launch {
shareSheetState.hide()
}
coroutineScope.launch {
onHideSheet()
}
@ -193,6 +203,9 @@ fun MessageContextSheet(
Toast.LENGTH_SHORT
).show()
coroutineScope.launch {
shareSheetState.hide()
}
coroutineScope.launch {
onHideSheet()
}