From 87db1e3d5f5fc7079a987d5807fa88bc6ad9024a Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 25 Mar 2024 12:48:02 -0700 Subject: [PATCH] Continue marking things as MainActor. --- Shared/SmartFeeds/SmartFeedDelegate.swift | 5 ++--- Shared/SmartFeeds/StarredFeedDelegate.swift | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Shared/SmartFeeds/SmartFeedDelegate.swift b/Shared/SmartFeeds/SmartFeedDelegate.swift index 8ee36d7a7..e5adf7e4c 100644 --- a/Shared/SmartFeeds/SmartFeedDelegate.swift +++ b/Shared/SmartFeeds/SmartFeedDelegate.swift @@ -15,10 +15,9 @@ import Core protocol SmartFeedDelegate: SidebarItemIdentifiable, DisplayNameProvider, ArticleFetcher, SmallIconProvider { - var fetchType: FetchType { get } + @MainActor var fetchType: FetchType { get } - func unreadCount(account: Account) async -> Int -// func fetchUnreadCount(for: Account, completion: @escaping SingleUnreadCountCompletionBlock) + @MainActor func unreadCount(account: Account) async -> Int } extension SmartFeedDelegate { diff --git a/Shared/SmartFeeds/StarredFeedDelegate.swift b/Shared/SmartFeeds/StarredFeedDelegate.swift index b471fc1e9..91fe462fd 100644 --- a/Shared/SmartFeeds/StarredFeedDelegate.swift +++ b/Shared/SmartFeeds/StarredFeedDelegate.swift @@ -13,7 +13,7 @@ import Account // Main thread only. -struct StarredFeedDelegate: SmartFeedDelegate { +@MainActor struct StarredFeedDelegate: SmartFeedDelegate { var sidebarItemID: SidebarItemIdentifier? { return SidebarItemIdentifier.smartFeed(String(describing: StarredFeedDelegate.self))