(chore): Don't wrap an intent-chooser inside another intent-chooser (#1505)
This commit is contained in:
parent
7380e77b5c
commit
a09e55270c
2 changed files with 3 additions and 9 deletions
|
|
@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.ui.manga
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import androidx.activity.compose.BackHandler
|
import androidx.activity.compose.BackHandler
|
||||||
|
|
@ -693,12 +692,7 @@ class MangaScreen(
|
||||||
try {
|
try {
|
||||||
getMangaUrl(manga_, source_)?.let { url ->
|
getMangaUrl(manga_, source_)?.let { url ->
|
||||||
val intent = url.toUri().toShareIntent(context, type = "text/plain")
|
val intent = url.toUri().toShareIntent(context, type = "text/plain")
|
||||||
context.startActivity(
|
context.startActivity(intent)
|
||||||
Intent.createChooser(
|
|
||||||
intent,
|
|
||||||
context.stringResource(MR.strings.action_share),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
context.toast(e.message)
|
context.toast(e.message)
|
||||||
|
|
|
||||||
|
|
@ -1032,7 +1032,7 @@ class ReaderActivity : BaseActivity() {
|
||||||
private fun shareChapter() {
|
private fun shareChapter() {
|
||||||
assistUrl?.let {
|
assistUrl?.let {
|
||||||
val intent = it.toUri().toShareIntent(this, type = "text/plain")
|
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)
|
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) {
|
private fun onCopyImageResult(uri: Uri) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue