From e94985e7f204ee24ace854786100bba7154399d8 Mon Sep 17 00:00:00 2001 From: Nate Weaver Date: Sat, 11 Jan 2020 17:19:32 -0600 Subject: [PATCH] Update to latest RSCore --- Frameworks/Account/AccountManager.swift | 2 +- Shared/ArticleStyles/ArticleStyle.swift | 2 +- Shared/ArticleStyles/ArticleStylesManager.swift | 5 ++--- Shared/Data/ArticleStringFormatter.swift | 2 +- submodules/RSCore | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Frameworks/Account/AccountManager.swift b/Frameworks/Account/AccountManager.swift index 8183e68d3..d932e36f8 100644 --- a/Frameworks/Account/AccountManager.swift +++ b/Frameworks/Account/AccountManager.swift @@ -389,7 +389,7 @@ private struct AccountSpecifier { init?(folderPath: String) { - if !FileManager.default.rs_fileIsFolder(folderPath) { + if !FileManager.default.isFolder(atPath: folderPath) { return nil } diff --git a/Shared/ArticleStyles/ArticleStyle.swift b/Shared/ArticleStyles/ArticleStyle.swift index 3f6898ff5..868745c9b 100644 --- a/Shared/ArticleStyles/ArticleStyle.swift +++ b/Shared/ArticleStyles/ArticleStyle.swift @@ -37,7 +37,7 @@ struct ArticleStyle: Equatable { self.path = path - let isFolder = FileManager.default.rs_fileIsFolder(path) + let isFolder = FileManager.default.isFolder(atPath: path) if isFolder { diff --git a/Shared/ArticleStyles/ArticleStylesManager.swift b/Shared/ArticleStyles/ArticleStylesManager.swift index 2ce79f5e5..fa8bea895 100644 --- a/Shared/ArticleStyles/ArticleStylesManager.swift +++ b/Shared/ArticleStyles/ArticleStylesManager.swift @@ -133,8 +133,8 @@ final class ArticleStylesManager { private func allStylePaths(_ folder: String) -> [String] { - let filepaths = FileManager.default.rs_filepaths(inFolder: folder) - return filepaths.filter { fileAtPathIsStyle($0) } + let filepaths = FileManager.default.filePaths(inFolder: folder) + return filepaths?.filter { fileAtPathIsStyle($0) } ?? [] } private func fileAtPathIsStyle(_ f: String) -> Bool { @@ -174,7 +174,6 @@ private func pathIsPathForStyleName(_ styleName: String, path: String) -> Bool { } private func pathForStyleName(_ styleName: String, folder: String) -> String? { - for onePath in allStylePaths(folder) { if pathIsPathForStyleName(styleName, path: onePath) { return onePath diff --git a/Shared/Data/ArticleStringFormatter.swift b/Shared/Data/ArticleStringFormatter.swift index 6bd00baf3..56364690f 100644 --- a/Shared/Data/ArticleStringFormatter.swift +++ b/Shared/Data/ArticleStringFormatter.swift @@ -100,7 +100,7 @@ struct ArticleStringFormatter { } static func dateString(_ date: Date) -> String { - if NSCalendar.rs_dateIsToday(date) { + if Calendar.dateIsToday(date) { return timeFormatter.string(from: date) } return dateFormatter.string(from: date) diff --git a/submodules/RSCore b/submodules/RSCore index 806d1fdc1..070f40e9b 160000 --- a/submodules/RSCore +++ b/submodules/RSCore @@ -1 +1 @@ -Subproject commit 806d1fdc16511a9469bf2a18348caf9f20ff8cdc +Subproject commit 070f40e9b39ac428d09eafeb8b47ce8dde78ced8