From 141d3561dd76e105f8a35fe77b2ad20857f2e39a Mon Sep 17 00:00:00 2001 From: Marcus Kida Date: Tue, 9 May 2023 16:07:08 +0200 Subject: [PATCH] Only update current active user in-memory state --- .../MastodonCore/Service/AuthenticationService.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MastodonSDK/Sources/MastodonCore/Service/AuthenticationService.swift b/MastodonSDK/Sources/MastodonCore/Service/AuthenticationService.swift index 04093a40d..d0b16150e 100644 --- a/MastodonSDK/Sources/MastodonCore/Service/AuthenticationService.swift +++ b/MastodonSDK/Sources/MastodonCore/Service/AuthenticationService.swift @@ -68,11 +68,11 @@ public final class AuthenticationService: NSObject { } public func fetchFollowingAndBlockedAsync() { - /// we're dispatching this as a separate async call to not block the caller + /// We're dispatching this as a separate async call to not block the caller + /// Also we'll only be updating the current active user as the state will be reflesh upon user-change anyways Task { - for authBox in mastodonAuthenticationBoxes { - do { try await fetchFollowedBlockedUserIds(authBox) } - catch {} + if let authBox = mastodonAuthenticationBoxes.first { + try await fetchFollowedBlockedUserIds(authBox) } } } }