Merge pull request #1650 from Wevah/ios-candidate

Data+RSCore
This commit is contained in:
Brent Simmons 2020-01-18 17:38:25 -08:00 committed by GitHub
commit a8f87e9590
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 8 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) {

@ -1 +1 @@
Subproject commit ff84d501b7c6c9daf88ee1b2f3441543f0bc4475 Subproject commit daf6791b7c049f206fb4c626223676919b1fb6f0