@@ -27,7 +27,7 @@ import com.xwray.groupie.viewbinding.GroupieViewHolder
2727import icepick.State
2828import io.reactivex.rxjava3.disposables.CompositeDisposable
2929import org.schabi.newpipe.R
30- import org.schabi.newpipe.database.feed.model.FeedGroupEntity
30+ import org.schabi.newpipe.database.feed.model.FeedGroupEntity.Companion.GROUP_ALL_ID
3131import org.schabi.newpipe.databinding.DialogTitleBinding
3232import org.schabi.newpipe.databinding.FeedItemCarouselBinding
3333import org.schabi.newpipe.databinding.FragmentSubscriptionBinding
@@ -276,14 +276,8 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
276276 }
277277 }
278278 carouselAdapter.setOnItemLongClickListener { item, _ ->
279- if ((
280- item is FeedGroupCardItem &&
281- item.groupId == FeedGroupEntity .GROUP_ALL_ID
282- ) ||
283- (
284- item is FeedGroupCardGridItem &&
285- item.groupId == FeedGroupEntity .GROUP_ALL_ID
286- )
279+ if ((item is FeedGroupCardItem && item.groupId == GROUP_ALL_ID ) ||
280+ (item is FeedGroupCardGridItem && item.groupId == GROUP_ALL_ID )
287281 ) {
288282 return @setOnItemLongClickListener false
289283 }
@@ -437,10 +431,10 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
437431 clear()
438432 if (listViewMode) {
439433 add(FeedGroupAddNewItem ())
440- add(FeedGroupCardItem (- 1 , getString(R .string.all), FeedGroupIcon .RSS ))
434+ add(FeedGroupCardItem (GROUP_ALL_ID , getString(R .string.all), FeedGroupIcon .RSS ))
441435 } else {
442436 add(FeedGroupAddNewGridItem ())
443- add(FeedGroupCardGridItem (- 1 , getString(R .string.all), FeedGroupIcon .RSS ))
437+ add(FeedGroupCardGridItem (GROUP_ALL_ID , getString(R .string.all), FeedGroupIcon .RSS ))
444438 }
445439 addAll(groups)
446440 }
0 commit comments