(chore): Don't wrap an intent-chooser inside another intent-chooser (#1505)

This commit is contained in:
Cuong-Tran 2025-07-04 12:00:00 +07:00
parent 7380e77b5c
commit a09e55270c
2 changed files with 3 additions and 9 deletions

View file

@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.ui.manga
import android.Manifest
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import androidx.activity.compose.BackHandler
@ -693,12 +692,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)

View file

@ -1032,7 +1032,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)
}
}
@ -1238,7 +1238,7 @@ class ReaderActivity : BaseActivity() {
stringResource(MR.strings.share_page_info, manga.title, chapter.name, page.number)
},
)
startActivity(Intent.createChooser(intent, stringResource(MR.strings.action_share)))
startActivity(intent)
}
private fun onCopyImageResult(uri: Uri) {