Remove unused markEverywhereAsRead.

This commit is contained in:
Brent Simmons 2019-03-16 16:48:14 -07:00
parent 1d484220eb
commit cb45897256
4 changed files with 0 additions and 31 deletions

View File

@ -426,14 +426,6 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
database.fetchStarredAndUnreadCount(for: flattenedFeeds().feedIDs(), callback: callback)
}
public func markEverywhereAsRead() {
// Does not support undo.
database.markEverywhereAsRead()
flattenedFeeds().forEach { $0.unreadCount = 0 }
}
public func opmlDocument() -> String {
let escapedTitle = nameForDisplay.rs_stringByEscapingSpecialXMLCharacters()
let openingText =

View File

@ -99,10 +99,6 @@ public final class ArticlesDatabase {
public func mark(_ articles: Set<Article>, statusKey: ArticleStatus.Key, flag: Bool) -> Set<ArticleStatus>? {
return articlesTable.mark(articles, statusKey, flag)
}
public func markEverywhereAsRead() {
articlesTable.markEverywhereAsRead()
}
}
// MARK: - Private

View File

@ -289,11 +289,6 @@ final class ArticlesTable: DatabaseTable {
return statusesTable.mark(articles.statuses(), statusKey, flag)
}
func markEverywhereAsRead() {
return statusesTable.markEverywhereAsRead()
}
// MARK: Indexing
func indexUnindexedArticles() {

View File

@ -76,20 +76,6 @@ final class StatusesTable: DatabaseTable {
return updatedStatuses
}
func markEverywhereAsRead() {
queue.update { (database) in
let _ = database.executeUpdate("update statuses set read=1;", withArgumentsIn: nil)
let cachedStatuses = self.cache.cachedStatuses
DispatchQueue.main.async {
cachedStatuses.forEach { $0.read = true }
}
}
}
// MARK: Fetching
func statusWithRow(_ row: FMResultSet) -> ArticleStatus? {