reorder lines

This commit is contained in:
Avently
2024-04-17 18:06:04 +07:00
parent 39492eccef
commit 3def436437
2 changed files with 4 additions and 4 deletions

View File

@@ -106,11 +106,11 @@ class MainActivity: FragmentActivity() {
}
if (!onBackPressedDispatcher.hasEnabledCallbacks()) {
val sharedContent = chatModel.sharedContent.value
// Drop shared content
chatModel.sharedContent.value = null
if (sharedContent is SharedContent.Forward) {
chatModel.chatId.value = sharedContent.fromChatInfo.id
}
// Drop shared content
chatModel.sharedContent.value = null
if (canFinishActivity) {
finish()
}

View File

@@ -83,11 +83,11 @@ private fun ShareListToolbar(chatModel: ChatModel, userPickerState: MutableState
}
else -> NavigationButtonBack(onButtonClicked = {
val sharedContent = chatModel.sharedContent.value
// Drop shared content
chatModel.sharedContent.value = null
if (sharedContent is SharedContent.Forward) {
chatModel.chatId.value = sharedContent.fromChatInfo.id
}
// Drop shared content
chatModel.sharedContent.value = null
})
}
}