#1334 (modern widget)

- A small performance tweak: don't load stories if a preview with some content already.
This commit is contained in:
David Sinclair 2022-01-28 19:32:25 -08:00
parent 7829b70fb3
commit ab574ad193

View file

@ -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] = []