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 { 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) { 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 return
} }
let dataHash = (data as NSData).rs_md5HashString() let dataHash = data.md5String
if dataHash == feed.contentHash { if dataHash == feed.contentHash {
completion() completion()
return return
@ -137,6 +137,6 @@ private extension Data {
func isDefinitelyNotFeed() -> Bool { func isDefinitelyNotFeed() -> Bool {
// We only detect a few image types for now. This should get fleshed-out at some later date. // 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 return identifier
} }
let identifier = s.md5HashString let identifier = s.md5String
databaseIDCache[s] = identifier databaseIDCache[s] = identifier
return identifier return identifier
} }

View File

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

View File

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

View File

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