diff --git a/Mastodon/Scene/Profile/ProfileViewController.swift b/Mastodon/Scene/Profile/ProfileViewController.swift index 212e92d06..07d72c0b6 100644 --- a/Mastodon/Scene/Profile/ProfileViewController.swift +++ b/Mastodon/Scene/Profile/ProfileViewController.swift @@ -553,7 +553,7 @@ extension ProfileViewController { } // trigger authenticated user account update - viewModel.context.instanceService.updateActiveUserAccountPublisher.send() + viewModel.context.authenticationService.updateActiveUserAccountPublisher.send() DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { sender.endRefreshing() diff --git a/Mastodon/Scene/Root/MainTab/MainTabBarController.swift b/Mastodon/Scene/Root/MainTab/MainTabBarController.swift index 64066746a..987c1141b 100644 --- a/Mastodon/Scene/Root/MainTab/MainTabBarController.swift +++ b/Mastodon/Scene/Root/MainTab/MainTabBarController.swift @@ -313,7 +313,7 @@ extension MainTabBarController { let currentUserDisplayName = user.displayNameWithFallback ?? "no user" profileTabItem.accessibilityHint = L10n.Scene.AccountList.tabBarHint(currentUserDisplayName) - context.instanceService.updateActiveUserAccountPublisher + context.authenticationService.updateActiveUserAccountPublisher .sink { [weak self] in self?.updateUserAccount() } diff --git a/Mastodon/Supporting Files/SceneDelegate.swift b/Mastodon/Supporting Files/SceneDelegate.swift index fad0f0cd5..bf02b8031 100644 --- a/Mastodon/Supporting Files/SceneDelegate.swift +++ b/Mastodon/Supporting Files/SceneDelegate.swift @@ -111,7 +111,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { AppContext.shared.statusFilterService.filterUpdatePublisher.send() // trigger authenticated user account update - AppContext.shared.instanceService.updateActiveUserAccountPublisher.send() + AppContext.shared.authenticationService.updateActiveUserAccountPublisher.send() if let shortcutItem = savedShortCutItem { Task { diff --git a/MastodonSDK/Sources/MastodonCore/Service/AuthenticationService.swift b/MastodonSDK/Sources/MastodonCore/Service/AuthenticationService.swift index 48da254c6..0e5160679 100644 --- a/MastodonSDK/Sources/MastodonCore/Service/AuthenticationService.swift +++ b/MastodonSDK/Sources/MastodonCore/Service/AuthenticationService.swift @@ -25,6 +25,7 @@ public final class AuthenticationService: NSObject { // output @Published public var mastodonAuthentications: [ManagedObjectRecord] = [] @Published public var mastodonAuthenticationBoxes: [MastodonAuthenticationBox] = [] + public let updateActiveUserAccountPublisher = PassthroughSubject() init( managedObjectContext: NSManagedObjectContext, diff --git a/MastodonSDK/Sources/MastodonCore/Service/InstanceService.swift b/MastodonSDK/Sources/MastodonCore/Service/InstanceService.swift index 7f6669250..4cd804036 100644 --- a/MastodonSDK/Sources/MastodonCore/Service/InstanceService.swift +++ b/MastodonSDK/Sources/MastodonCore/Service/InstanceService.swift @@ -24,7 +24,6 @@ public final class InstanceService { weak var authenticationService: AuthenticationService? // output - public let updateActiveUserAccountPublisher = PassthroughSubject() init( apiService: APIService,