Update iOS code to handle module changes.

This commit is contained in:
Brent Simmons 2024-03-20 20:54:21 -07:00
parent 2461e937bf
commit 13871495f3
7 changed files with 16 additions and 6 deletions

View File

@ -646,7 +646,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
fetchUnreadCounts(for: feeds, completion: completion)
}
public func articles(for fetchType: FetchType) async throws -> Set<Article> {
@MainActor public func articles(for fetchType: FetchType) async throws -> Set<Article> {
switch fetchType {

View File

@ -10,6 +10,7 @@ import UIKit
import Account
import RSTree
import RSParser
import Core
enum AddFeedType {
case web

View File

@ -434,11 +434,14 @@ private extension AppDelegate {
resumeDatabaseProcessingIfNecessary()
guard let account = accountManager.existingAccount(with: articlePathInfo.accountID) else {
guard let accountID = articlePathInfo.accountID, let account = accountManager.existingAccount(with: accountID) else {
os_log(.debug, "No account found from notification.")
return
}
let articleID = articlePathInfo.articleID
guard let articleID = articlePathInfo.articleID else {
os_log(.debug, "No articleID found from notification.")
return
}
Task { @MainActor in
guard let articles = try? await account.articles(for: .articleIDs([articleID])) else {
@ -468,11 +471,14 @@ private extension AppDelegate {
resumeDatabaseProcessingIfNecessary()
guard let account = accountManager.existingAccount(with: articlePathInfo.accountID) else {
guard let accountID = articlePathInfo.accountID, let account = accountManager.existingAccount(with: accountID) else {
os_log(.debug, "No account found from notification.")
return
}
let articleID = articlePathInfo.articleID
guard let articleID = articlePathInfo.articleID else {
os_log(.debug, "No articleID found from notification.")
return
}
Task { @MainActor in

View File

@ -9,6 +9,7 @@
import UIKit
import Account
import RSTree
import Core
extension SidebarViewController: UITableViewDropDelegate {

View File

@ -13,6 +13,7 @@ import Articles
import RSTree
import SafariServices
import SwiftUI
import Core
protocol MainControllerIdentifiable {
var mainControllerIdentifier: MainControllerIdentifier { get }

View File

@ -8,6 +8,7 @@
import Account
import UIKit
import Core
protocol AddAccountDismissDelegate: UIViewController {
func dismiss()

View File

@ -9,7 +9,7 @@
import UIKit
import Articles
struct TimelineCellData {
@MainActor struct TimelineCellData {
private static let noText = NSLocalizedString("(No Text)", comment: "No Text")