mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 18:01:49 +01:00
More fixes to text selection in manga details
Thought about using a dialog popup to select text but it's just so unfriendly I'll stick to the bugs Once again leave it to google to not fix bugs https://issuetracker.google.com/issues/37095917
This commit is contained in:
parent
cb7159d22e
commit
63df493cb4
@ -485,7 +485,7 @@ class MangaDetailsController :
|
||||
}
|
||||
colorAnimator?.cancel()
|
||||
|
||||
getHeader()?.unbind()
|
||||
getHeader()?.clearDescFocus()
|
||||
val colorSecondary = activity?.getResourceColor(
|
||||
R.attr.colorSecondary
|
||||
) ?: Color.BLACK
|
||||
@ -511,6 +511,9 @@ class MangaDetailsController :
|
||||
if (type == ControllerChangeType.PUSH_ENTER) {
|
||||
binding.swipeRefresh.isRefreshing = presenter.isLoading
|
||||
}
|
||||
if (!type.isEnter) {
|
||||
activityBinding?.root?.clearFocus()
|
||||
}
|
||||
}
|
||||
|
||||
override fun handleBack(): Boolean {
|
||||
|
@ -27,7 +27,7 @@ import eu.kanade.tachiyomi.util.view.updateLayoutParams
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
class MangaHeaderHolder(
|
||||
private val view: View,
|
||||
view: View,
|
||||
private val adapter: MangaDetailsAdapter,
|
||||
startExpanded: Boolean,
|
||||
isTablet: Boolean = false
|
||||
@ -201,8 +201,7 @@ class MangaHeaderHolder(
|
||||
else manga.description?.trim()
|
||||
|
||||
binding.mangaSummary.post {
|
||||
binding.mangaSummary
|
||||
if (binding.subItemGroup.visibility != View.GONE) {
|
||||
if (binding.subItemGroup.isVisible) {
|
||||
if ((binding.mangaSummary.lineCount < 3 && manga.genre.isNullOrBlank()) || binding.lessButton.isVisible) {
|
||||
binding.mangaSummary.setTextIsSelectable(true)
|
||||
binding.moreButtonGroup.isVisible = false
|
||||
@ -312,9 +311,10 @@ class MangaHeaderHolder(
|
||||
updateCover(manga)
|
||||
}
|
||||
|
||||
fun unbind() {
|
||||
binding?.mangaSummary?.setTextIsSelectable(false)
|
||||
binding?.mangaSummary?.clearFocus()
|
||||
fun clearDescFocus() {
|
||||
binding ?: return
|
||||
binding.mangaSummary.setTextIsSelectable(false)
|
||||
binding.mangaSummary.clearFocus()
|
||||
}
|
||||
|
||||
private fun MaterialButton.checked(checked: Boolean) {
|
||||
|
@ -41,15 +41,6 @@ class MangaHeaderItem(val manga: Manga, var startExpanded: Boolean) :
|
||||
else holder.bind(this, manga)
|
||||
}
|
||||
|
||||
override fun unbindViewHolder(
|
||||
adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>?,
|
||||
holder: MangaHeaderHolder?,
|
||||
position: Int
|
||||
) {
|
||||
holder?.unbind()
|
||||
super.unbindViewHolder(adapter, holder, position)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
return (this === other)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user