From 8ceefee1e360755321acaee494cb89d7a082ab91 Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 27 Oct 2022 13:51:56 +0200 Subject: [PATCH] Put "New feed group" item at the top --- .../schabi/newpipe/local/subscription/SubscriptionFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt index 7bee7f7ee..770da3afe 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt @@ -414,6 +414,7 @@ class SubscriptionFragment : BaseStateFragment() { val listViewMode = viewModel.getListViewMode() carouselAdapter.clear() + carouselAdapter.add(if (listViewMode) FeedGroupAddNewItem() else FeedGroupAddNewGridItem()) carouselAdapter.add( if (listViewMode) FeedGroupCardItem(-1, getString(R.string.all), FeedGroupIcon.RSS) @@ -421,7 +422,6 @@ class SubscriptionFragment : BaseStateFragment() { FeedGroupCardGridItem(-1, getString(R.string.all), FeedGroupIcon.RSS) ) carouselAdapter.addAll(groups) - carouselAdapter.add(if (listViewMode) FeedGroupAddNewItem() else FeedGroupAddNewGridItem()) if (feedGroupsCarouselState != null) { feedGroupsCarousel.onRestoreInstanceState(feedGroupsCarouselState)