Unbreak the build. Don’t know if anything works, but at least it builds.
This commit is contained in:
parent
f49c552bf9
commit
3d5358af09
|
@ -95,7 +95,7 @@ public final class LocalAccount: Account, PlistProvider {
|
|||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(unreadCountDidChange(_:)), name: .UnreadCountDidChange, object: nil)
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(refreshProgressDidChange(_:)), name: .RSProgressDidChange, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(refreshProgressDidChange(_:)), name: .AccountRefreshProgressDidChange, object: nil)
|
||||
|
||||
DispatchQueue.main.async() { () -> Void in
|
||||
self.updateUnreadCounts(feedIDs: self.flattenedFeedIDs)
|
||||
|
@ -332,7 +332,7 @@ public final class LocalAccount: Account, PlistProvider {
|
|||
|
||||
dynamic func refreshProgressDidChange(_ notification: Notification) {
|
||||
|
||||
guard let progress = notification.object as? RSProgress, progress === refresher.progress else {
|
||||
guard let progress = notification.object as? DownloadProgress, progress === refresher.progress else {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ final class LocalAccountRefresher: DownloadSessionDelegate {
|
|||
if data.isEmpty {
|
||||
return true
|
||||
}
|
||||
if let mimeType = RSMimeTypeForData(data), RSMimeTypeIsMedia(mimeType) {
|
||||
if data.isDefinitelyNotFeed() {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -125,6 +125,13 @@ final class LocalAccountRefresher: DownloadSessionDelegate {
|
|||
//
|
||||
// print("Not modified response for \(feed.url).")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private extension Data {
|
||||
|
||||
func isDefinitelyNotFeed() -> Bool {
|
||||
|
||||
// We only detect a few image types for now. This should get fleshed-out at some later date.
|
||||
return (self as NSData).rs_dataIsImage()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue