Skip to content

Commit f712ea3

Browse files
committed
Merge remote-tracking branch 'origin/list-view-alt-alt-implementation' into list-view-alt-alt-implementation
2 parents a44b7c9 + 4b32890 commit f712ea3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/local/subscription/SubscriptionFragment.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,12 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
423423
feedGroupsSortMenuItem.showSortButton = groups.size > 1
424424
feedGroupsSortMenuItem.listViewMode = listViewMode
425425
binding.itemsList.post {
426+
if (context == null) {
427+
// since this part was posted to the next UI cycle, the fragment might have been
428+
// removed in the meantime
429+
return@post
430+
}
431+
426432
feedGroupsCarousel.notifyChanged(FeedGroupCarouselItem.PAYLOAD_UPDATE_LIST_VIEW_MODE)
427433
feedGroupsSortMenuItem.notifyChanged(GroupsHeader.PAYLOAD_UPDATE_ICONS)
428434

0 commit comments

Comments
 (0)