fix: add padding to last item in recycler (#293)

* fix: add padding to last item in recycler

Stop guessing numbers to compensate for a view we can measure. by adding a method to measure them.

* fix: avoid scrolling artifacts in nested
This commit is contained in:
TwistedUmbrellaX 2024-03-26 17:10:02 -04:00 committed by GitHub
parent 19b5b11b07
commit 77c57846ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 47 additions and 8 deletions

View file

@ -28,6 +28,7 @@ import ani.dantotsu.connections.comments.CommentsAPI
import ani.dantotsu.databinding.FragmentCommentsBinding
import ani.dantotsu.loadImage
import ani.dantotsu.media.MediaDetailsActivity
import ani.dantotsu.setBaseline
import ani.dantotsu.settings.saving.PrefManager
import ani.dantotsu.settings.saving.PrefName
import ani.dantotsu.snackString
@ -73,6 +74,9 @@ class CommentsFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
activity = requireActivity() as MediaDetailsActivity
binding.commentsList.setBaseline(activity.navBar, activity.binding.commentInputLayout)
//get the media id from the intent
val mediaId = arguments?.getInt("mediaId") ?: -1
mediaName = arguments?.getString("mediaName") ?: "unknown"
@ -366,6 +370,7 @@ class CommentsFragment : Fragment() {
override fun onResume() {
super.onResume()
tag = null
binding.commentsList.setBaseline(activity.navBar, activity.binding.commentInputLayout)
section.groups.forEach {
if (it is CommentItem && it.containsGif()) {
it.notifyChanged()