mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-21 12:45:44 +03:00
Reorder reader menu overflow items
This commit is contained in:
parent
afa5002988
commit
788235feec
2 changed files with 16 additions and 16 deletions
|
@ -45,8 +45,8 @@ fun ReaderAppBars(
|
|||
onClickTopAppBar: () -> Unit,
|
||||
bookmarked: Boolean,
|
||||
onToggleBookmarked: () -> Unit,
|
||||
onOpenInBrowser: (() -> Unit)?,
|
||||
onOpenInWebView: (() -> Unit)?,
|
||||
onOpenInBrowser: (() -> Unit)?,
|
||||
onShare: (() -> Unit)?,
|
||||
|
||||
viewer: Viewer?,
|
||||
|
@ -120,14 +120,6 @@ fun ReaderAppBars(
|
|||
onClick = onToggleBookmarked,
|
||||
),
|
||||
)
|
||||
onOpenInBrowser?.let {
|
||||
add(
|
||||
AppBar.OverflowAction(
|
||||
title = stringResource(MR.strings.action_open_in_browser),
|
||||
onClick = it,
|
||||
),
|
||||
)
|
||||
}
|
||||
onOpenInWebView?.let {
|
||||
add(
|
||||
AppBar.OverflowAction(
|
||||
|
@ -136,6 +128,14 @@ fun ReaderAppBars(
|
|||
),
|
||||
)
|
||||
}
|
||||
onOpenInBrowser?.let {
|
||||
add(
|
||||
AppBar.OverflowAction(
|
||||
title = stringResource(MR.strings.action_open_in_browser),
|
||||
onClick = it,
|
||||
),
|
||||
)
|
||||
}
|
||||
onShare?.let {
|
||||
add(
|
||||
AppBar.OverflowAction(
|
||||
|
|
|
@ -390,8 +390,8 @@ class ReaderActivity : BaseActivity() {
|
|||
onClickTopAppBar = ::openMangaScreen,
|
||||
bookmarked = state.bookmarked,
|
||||
onToggleBookmarked = viewModel::toggleChapterBookmark,
|
||||
onOpenInBrowser = ::openChapterInBrowser.takeIf { isHttpSource },
|
||||
onOpenInWebView = ::openChapterInWebView.takeIf { isHttpSource },
|
||||
onOpenInBrowser = ::openChapterInBrowser.takeIf { isHttpSource },
|
||||
onShare = ::shareChapter.takeIf { isHttpSource },
|
||||
|
||||
viewer = state.viewer,
|
||||
|
@ -565,12 +565,6 @@ class ReaderActivity : BaseActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun openChapterInBrowser() {
|
||||
assistUrl?.let {
|
||||
openInBrowser(it.toUri(), forceDefaultBrowser = false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun openChapterInWebView() {
|
||||
val manga = viewModel.manga ?: return
|
||||
val source = viewModel.getSource() ?: return
|
||||
|
@ -580,6 +574,12 @@ class ReaderActivity : BaseActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun openChapterInBrowser() {
|
||||
assistUrl?.let {
|
||||
openInBrowser(it.toUri(), forceDefaultBrowser = false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun shareChapter() {
|
||||
assistUrl?.let {
|
||||
val intent = it.toUri().toShareIntent(this, type = "text/plain")
|
||||
|
|
Loading…
Reference in a new issue