|
|
|
@ -81,7 +81,7 @@ class DetailsFragment :
|
|
|
|
BaseFragment<FragmentDetailsBinding>(),
|
|
|
|
BaseFragment<FragmentDetailsBinding>(),
|
|
|
|
View.OnClickListener,
|
|
|
|
View.OnClickListener,
|
|
|
|
ChipsView.OnChipClickListener,
|
|
|
|
ChipsView.OnChipClickListener,
|
|
|
|
OnListItemClickListener<Bookmark>, ViewTreeObserver.OnDrawListener {
|
|
|
|
OnListItemClickListener<Bookmark>, ViewTreeObserver.OnDrawListener, View.OnLayoutChangeListener {
|
|
|
|
|
|
|
|
|
|
|
|
@Inject
|
|
|
|
@Inject
|
|
|
|
lateinit var coil: ImageLoader
|
|
|
|
lateinit var coil: ImageLoader
|
|
|
|
@ -105,6 +105,7 @@ class DetailsFragment :
|
|
|
|
binding.buttonScrobblingMore.setOnClickListener(this)
|
|
|
|
binding.buttonScrobblingMore.setOnClickListener(this)
|
|
|
|
binding.buttonRelatedMore.setOnClickListener(this)
|
|
|
|
binding.buttonRelatedMore.setOnClickListener(this)
|
|
|
|
binding.infoLayout.textViewSource.setOnClickListener(this)
|
|
|
|
binding.infoLayout.textViewSource.setOnClickListener(this)
|
|
|
|
|
|
|
|
binding.textViewDescription.addOnLayoutChangeListener(this)
|
|
|
|
binding.textViewDescription.viewTreeObserver.addOnDrawListener(this)
|
|
|
|
binding.textViewDescription.viewTreeObserver.addOnDrawListener(this)
|
|
|
|
binding.textViewDescription.movementMethod = LinkMovementMethod.getInstance()
|
|
|
|
binding.textViewDescription.movementMethod = LinkMovementMethod.getInstance()
|
|
|
|
binding.chipsTags.onChipClickListener = this
|
|
|
|
binding.chipsTags.onChipClickListener = this
|
|
|
|
@ -150,6 +151,22 @@ class DetailsFragment :
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override fun onLayoutChange(
|
|
|
|
|
|
|
|
v: View?,
|
|
|
|
|
|
|
|
left: Int,
|
|
|
|
|
|
|
|
top: Int,
|
|
|
|
|
|
|
|
right: Int,
|
|
|
|
|
|
|
|
bottom: Int,
|
|
|
|
|
|
|
|
oldLeft: Int,
|
|
|
|
|
|
|
|
oldTop: Int,
|
|
|
|
|
|
|
|
oldRight: Int,
|
|
|
|
|
|
|
|
oldBottom: Int
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
with(viewBinding ?: return) {
|
|
|
|
|
|
|
|
buttonDescriptionMore.isVisible = textViewDescription.isTextTruncated
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private fun onMangaUpdated(manga: Manga) {
|
|
|
|
private fun onMangaUpdated(manga: Manga) {
|
|
|
|
with(requireViewBinding()) {
|
|
|
|
with(requireViewBinding()) {
|
|
|
|
// Main
|
|
|
|
// Main
|
|
|
|
@ -228,7 +245,6 @@ class DetailsFragment :
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
tv.text = description
|
|
|
|
tv.text = description
|
|
|
|
}
|
|
|
|
}
|
|
|
|
requireViewBinding().buttonDescriptionMore.isVisible = tv.isTextTruncated
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private fun onLocalSizeChanged(size: Long) {
|
|
|
|
private fun onLocalSizeChanged(size: Long) {
|
|
|
|
|