Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #7059: Don't show Brave News reload button on RSS-only feed
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehickinson committed Mar 8, 2023
1 parent 6a9f2ba commit 64c81e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion Sources/Brave/WebFilters/AdblockRustEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
3 changes: 2 additions & 1 deletion Sources/BraveNews/Composer/FeedDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 64c81e7

Please sign in to comment.