From 64c81e724ec81b0fb5e8b19ea5a0aa552287c5df Mon Sep 17 00:00:00 2001 From: Kyle Hickinson Date: Wed, 8 Mar 2023 15:48:31 -0500 Subject: [PATCH] Fix #7059: Don't show Brave News reload button on RSS-only feed --- Sources/Brave/WebFilters/AdblockRustEngine.swift | 1 - Sources/BraveNews/Composer/FeedDataSource.swift | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Brave/WebFilters/AdblockRustEngine.swift b/Sources/Brave/WebFilters/AdblockRustEngine.swift index 16cab88e537..54f409c60b6 100644 --- a/Sources/Brave/WebFilters/AdblockRustEngine.swift +++ b/Sources/Brave/WebFilters/AdblockRustEngine.swift @@ -30,7 +30,6 @@ extension AdblockEngine { } guard let requestHost = requestURL.host, let sourceHost = sourceURL.host else { - assertionFailure("You must provide absolute paths for `requestURL` and `sourceURL`") return false } diff --git a/Sources/BraveNews/Composer/FeedDataSource.swift b/Sources/BraveNews/Composer/FeedDataSource.swift index 1f0f7f81f87..e1ccdebf33b 100644 --- a/Sources/BraveNews/Composer/FeedDataSource.swift +++ b/Sources/BraveNews/Composer/FeedDataSource.swift @@ -513,7 +513,8 @@ public class FeedDataSource: ObservableObject { /// Whether or not the feed content is currently expired and needs to be reloaded public var isFeedContentExpired: Bool { - return followedLocales.allSatisfy({ isResourceExpired(.feed, localeIdentifier: $0) }) + let locales = followedLocales + return !locales.isEmpty && locales.allSatisfy({ isResourceExpired(.feed, localeIdentifier: $0) }) } /// Whether or not the sources are currently expired and needs to be reloaded