Fix share cover name, make ainz happy by hiding other options
This commit is contained in:
parent
96989bfa53
commit
cb6a991e9f
app/src/main
@ -26,6 +26,7 @@ import androidx.core.graphics.blue
|
||||
import androidx.core.graphics.green
|
||||
import androidx.core.graphics.red
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.core.view.forEach
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.ConcatAdapter
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
@ -152,10 +153,12 @@ class MangaController :
|
||||
constructor(bundle: Bundle) : this(bundle.getLong(MANGA_EXTRA))
|
||||
|
||||
// SY -->
|
||||
constructor(redirect: MangaPresenter.EXHRedirect) : super(Bundle().apply {
|
||||
putLong(MANGA_EXTRA, redirect.manga.id!!)
|
||||
putBoolean(UPDATE_EXTRA, redirect.update)
|
||||
}) {
|
||||
constructor(redirect: MangaPresenter.EXHRedirect) : super(
|
||||
Bundle().apply {
|
||||
putLong(MANGA_EXTRA, redirect.manga.id!!)
|
||||
putBoolean(UPDATE_EXTRA, redirect.update)
|
||||
}
|
||||
) {
|
||||
this.manga = redirect.manga
|
||||
if (manga != null) {
|
||||
source = Injekt.get<SourceManager>().getOrStub(redirect.manga.source)
|
||||
@ -456,6 +459,11 @@ class MangaController :
|
||||
if (preferences.recommendsInOverflow().get()) menu.findItem(R.id.action_recommend).isVisible = true
|
||||
menu.findItem(R.id.action_merged).isVisible = presenter.manga.source == MERGED_SOURCE_ID
|
||||
menu.findItem(R.id.action_toggle_dedupe).isVisible = false // presenter.manga.source == MERGED_SOURCE_ID
|
||||
if (isExpanded) {
|
||||
menu.forEach {
|
||||
it.isVisible = false
|
||||
}
|
||||
}
|
||||
menu.findItem(R.id.action_share_cover).isVisible = isExpanded
|
||||
menu.findItem(R.id.action_save).isVisible = isExpanded
|
||||
// SY <--
|
||||
@ -827,6 +835,7 @@ class MangaController :
|
||||
binding.expandedImage.pivotX = 0f
|
||||
binding.expandedImage.pivotY = 0f
|
||||
isExpanded = true
|
||||
activity?.invalidateOptionsMenu()
|
||||
|
||||
currentAnimator = AnimatorSet().apply {
|
||||
play(
|
||||
@ -860,6 +869,7 @@ class MangaController :
|
||||
binding.expandedImage.clicks()
|
||||
.onEach {
|
||||
isExpanded = false
|
||||
activity?.invalidateOptionsMenu()
|
||||
currentAnimator?.cancel()
|
||||
|
||||
currentAnimator = AnimatorSet().apply {
|
||||
|
@ -256,7 +256,7 @@
|
||||
<string name="merge">Merge</string>
|
||||
<string name="merge_with_another_source">Merge With Another</string>
|
||||
<string name="cover_saved">Cover saved</string>
|
||||
<string name="share_cover">Cover saved</string>
|
||||
<string name="share_cover">Share cover</string>
|
||||
<string name="error_saving_cover">Error saving cover</string>
|
||||
<string name="error_sharing_cover">Error sharing cover</string>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user