mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
#1334 (modern widget)
- A small performance tweak: don't load stories if a preview with some content already.
This commit is contained in:
parent
7829b70fb3
commit
ab574ad193
1 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,10 @@ struct Provider: TimelineProvider {
|
|||
func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> ()) {
|
||||
cache.loadCachedStories()
|
||||
|
||||
if context.isPreview && !cache.stories.isEmpty {
|
||||
return
|
||||
}
|
||||
|
||||
cache.load {
|
||||
var entries: [SimpleEntry] = []
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue