Updates for Data+RSCore changes

This commit is contained in:
Nate Weaver 2020-01-18 01:00:56 -06:00
parent b150eaaff5
commit 7ee1f99962
6 changed files with 7 additions and 7 deletions

View File

@ -124,7 +124,7 @@ private extension FeedFinder {
}
static func isHTML(_ data: Data) -> Bool {
return (data as NSData).rs_dataIsProbablyHTML()
return data.isProbablyHTML
}
static func downloadFeedSpecifiers(_ downloadFeedSpecifiers: Set<FeedSpecifier>, feedSpecifiers: [String: FeedSpecifier], completion: @escaping (Result<Set<FeedSpecifier>, Error>) -> Void) {

View File

@ -73,7 +73,7 @@ extension LocalAccountRefresher: DownloadSessionDelegate {
return
}
let dataHash = (data as NSData).rs_md5HashString()
let dataHash = data.md5String
if dataHash == feed.contentHash {
completion()
return
@ -137,6 +137,6 @@ 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()
return self.isImage
}
}

View File

@ -26,7 +26,7 @@ public func databaseIDWithString(_ s: String) -> String {
return identifier
}
let identifier = s.md5HashString
let identifier = s.md5String
databaseIDCache[s] = identifier
return identifier
}

View File

@ -30,7 +30,7 @@ struct CrashLog {
return nil
}
self.content = s
self.contentHash = s.md5HashString
self.contentHash = s.md5String
self.path = path
self.modificationDate = modificationDate
}

View File

@ -34,7 +34,7 @@ final class SingleFaviconDownloader {
private let queue: DispatchQueue
private var diskKey: String {
return faviconURL.md5HashString
return faviconURL.md5String
}
init(faviconURL: String, homePageURL: String?, diskCache: BinaryDiskCache, queue: DispatchQueue) {

View File

@ -128,7 +128,7 @@ private extension ImageDownloader {
func diskKey(_ url: String) -> String {
return url.md5HashString
return url.md5String
}
func postImageDidBecomeAvailableNotification(_ url: String) {