diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt index a4b6e6b45..16b38aac9 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedFragment.kt @@ -151,7 +151,7 @@ class FeedFragment : BaseStateFragment() { !recyclerView.canScrollVertically(-1) ) { - if (feedBinding.newItemsLoadedLayout.isVisible) { + if (feedBinding.newItemsLoadedButton.isVisible) { hideNewItemsLoaded(true) } } @@ -619,8 +619,8 @@ class FeedFragment : BaseStateFragment() { } private fun showNewItemsLoaded() { - feedBinding.newItemsLoadedLayout.clearAnimation() - feedBinding.newItemsLoadedLayout + feedBinding.newItemsLoadedButton.clearAnimation() + feedBinding.newItemsLoadedButton .slideUp( 250L, delay = 100, @@ -636,20 +636,20 @@ class FeedFragment : BaseStateFragment() { } private fun hideNewItemsLoaded(animate: Boolean, delay: Long = 0) { - feedBinding.newItemsLoadedLayout.clearAnimation() + feedBinding.newItemsLoadedButton.clearAnimation() if (animate) { - feedBinding.newItemsLoadedLayout.animate( + feedBinding.newItemsLoadedButton.animate( false, 200, delay = delay, execOnEnd = { // Make the layout invisible so that the onScroll toTop method // only does necessary work - feedBinding?.newItemsLoadedLayout?.isVisible = false + feedBinding?.newItemsLoadedButton?.isVisible = false } ) } else { - feedBinding.newItemsLoadedLayout.isVisible = false + feedBinding.newItemsLoadedButton.isVisible = false } } diff --git a/app/src/main/res/layout/fragment_feed.xml b/app/src/main/res/layout/fragment_feed.xml index 8b2a44141..73e9d2ed1 100644 --- a/app/src/main/res/layout/fragment_feed.xml +++ b/app/src/main/res/layout/fragment_feed.xml @@ -87,25 +87,16 @@ - - -