Don't wrap an intent-chooser inside another intent-chooser (#2921)

(cherry picked from commit 20c899f2cd83fdd37dfc14d58ded6ae7581d3d65)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt
This commit is contained in:
Cuong-Tran
2026-02-20 21:20:13 +07:00
committed by Jobobby04
parent 3154c97aee
commit c1df3eb1d0
2 changed files with 3 additions and 9 deletions
@@ -1,7 +1,6 @@
package eu.kanade.tachiyomi.ui.manga
import android.content.Context
import android.content.Intent
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.layout.systemBarsPadding
@@ -403,12 +402,7 @@ class MangaScreen(
try {
getMangaUrl(manga_, source_)?.let { url ->
val intent = url.toUri().toShareIntent(context, type = "text/plain")
context.startActivity(
Intent.createChooser(
intent,
context.stringResource(MR.strings.action_share),
),
)
context.startActivity(intent)
}
} catch (e: Exception) {
context.toast(e.message)
@@ -934,7 +934,7 @@ class ReaderActivity : BaseActivity() {
private fun shareChapter() {
assistUrl?.let {
val intent = it.toUri().toShareIntent(this, type = "text/plain")
startActivity(Intent.createChooser(intent, stringResource(MR.strings.action_share)))
startActivity(intent)
}
}
@@ -1139,7 +1139,7 @@ class ReaderActivity : BaseActivity() {
context = applicationContext,
message = /* SY --> */ text, // SY <--
)
startActivity(Intent.createChooser(intent, stringResource(MR.strings.action_share)))
startActivity(intent)
}
private fun onCopyImageResult(uri: Uri) {