Disable Mark All as Read in Feed context menu item as it was just crushing Timeline performance

This commit is contained in:
Maurice Parker 2020-07-19 20:12:48 -05:00
parent feb2d2c9ab
commit 77dc455ce9
1 changed files with 13 additions and 11 deletions

View File

@ -81,17 +81,19 @@ struct TimelineContextMenu: View {
}
}
if let feed = timelineItem.article.webFeed, timelineModel.canMarkAllAsReadInFeed(feed) {
Divider()
Button {
timelineModel.markAllAsReadInFeed(feed)
} label: {
Text("Mark All as Read in “\(feed.nameForDisplay)")
#if os(iOS)
AppAssets.markAllAsReadImage
#endif
}
}
// This thing isn't lazily initialized and gets called excessively even for things like selecting an article
// if let feed = timelineItem.article.webFeed, timelineModel.canMarkAllAsReadInFeed(feed) {
// Divider()
// Button {
// timelineModel.markAllAsReadInFeed(feed)
// } label: {
// Text("Mark All as Read in \(feed.nameForDisplay)")
// #if os(iOS)
// AppAssets.markAllAsReadImage
// #endif
// }
// }
if timelineModel.canOpenIndicatedArticleInBrowser(timelineItem.article) {
Divider()