@@ -176,6 +176,7 @@ class ConversationsListActivity : BaseActivity() {
176176 private var textToPaste: String? = " "
177177 private var selectedMessageId: String? = null
178178 private var pendingDirectShareToken: String? = null
179+ private var isDirectShareTarget = false
179180
180181 lateinit var ecosystemManager: EcosystemManager
181182
@@ -489,7 +490,10 @@ class ConversationsListActivity : BaseActivity() {
489490 if (token != null ) {
490491 pendingDirectShareToken = null
491492 val conversation = list.firstOrNull { it.token == token }
492- if (conversation != null ) handleConversation(conversation)
493+ if (conversation != null ) {
494+ isDirectShareTarget = true
495+ handleConversation(conversation)
496+ }
493497 }
494498
495499 // Update dynamic shortcuts for frequent/favorite conversations
@@ -832,6 +836,15 @@ class ConversationsListActivity : BaseActivity() {
832836
833837 private fun showSendFilesConfirmDialog () {
834838 if (platformPermissionUtil.isFilesPermissionGranted()) {
839+ if (isDirectShareTarget) {
840+ // Skip the "Send this file to X?" confirmation: the user already picked this exact
841+ // conversation directly from Android's share sheet, so re-confirming the target here
842+ // would just be a redundant extra tap. Go straight to the upload preview screen.
843+ isDirectShareTarget = false
844+ openConversation()
845+ return
846+ }
847+
835848 val fileNamesWithLineBreaks = StringBuilder (" \n " )
836849 for (file in filesToShare!! ) {
837850 val filename = FileUtils .getFileName(file.toUri(), context)
0 commit comments