Implement debugDropConditionalGetInfo command. Fix #197.

This commit is contained in:
Brent Simmons 2017-11-25 11:13:15 -08:00
parent e4008b677f
commit bd8b7c6ed9
2 changed files with 19 additions and 0 deletions

View File

@ -352,6 +352,15 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
flattenedFeeds().forEach { $0.unreadCount = 0 } flattenedFeeds().forEach { $0.unreadCount = 0 }
} }
// MARK: - Debug
public func debugDropConditionalGetInfo() {
#if DEBUG
flattenedFeeds().forEach{ $0.debugDropConditionalGetInfo() }
#endif
}
// MARK: - Notifications // MARK: - Notifications
@objc func downloadProgressDidChange(_ note: Notification) { @objc func downloadProgressDidChange(_ note: Notification) {

View File

@ -136,6 +136,16 @@ public final class Feed: DisplayNameProvider, UnreadCountProvider, Hashable {
} }
} }
// MARK: - Debug
public func debugDropConditionalGetInfo() {
conditionalGetInfo = nil
contentHash = nil
}
// MARK: - Equatable
public class func ==(lhs: Feed, rhs: Feed) -> Bool { public class func ==(lhs: Feed, rhs: Feed) -> Bool {
return lhs === rhs return lhs === rhs