Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data+RSCore #1650

Merged
merged 2 commits into from
Jan 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Frameworks/Account/FeedFinder/FeedFinder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions Frameworks/Account/LocalAccount/LocalAccountRefresher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion Frameworks/Articles/DatabaseID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion Mac/CrashReporter/CrashReporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion Shared/Favicons/SingleFaviconDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion Shared/Images/ImageDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private extension ImageDownloader {

func diskKey(_ url: String) -> String {

return url.md5HashString
return url.md5String
}

func postImageDidBecomeAvailableNotification(_ url: String) {
Expand Down
2 changes: 1 addition & 1 deletion submodules/RSCore