From 43451ca84abc0dd91f536b62dffd36f81b525c8a Mon Sep 17 00:00:00 2001 From: TobiGr Date: Fri, 2 Apr 2021 21:28:01 +0200 Subject: [PATCH] Fix getting error cause Fix error dialog not shown when getting elemets from first subscription failed. --- .../main/java/org/schabi/newpipe/local/feed/FeedFragment.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 a8171530f05..0d7a9a11f67 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 @@ -264,7 +264,9 @@ class FeedFragment : BaseListFragment() { ) } - if (oldestSubscriptionUpdate != loadedState.oldestUpdate) { + if (oldestSubscriptionUpdate != loadedState.oldestUpdate || + (oldestSubscriptionUpdate == null && loadedState.oldestUpdate == null) + ) { // ignore errors if they have already been handled for the current update handleItemsErrors(loadedState.itemsErrors) } @@ -302,7 +304,7 @@ class FeedFragment : BaseListFragment() { subscriptionEntity -> handleFeedNotAvailable( subscriptionEntity, - t.cause?.cause, + t.cause, errors.subList(i + 1, errors.size) ) },