Update in-memory following/blocking states upon (un)follow/block action (IOS-140)
This commit is contained in:
parent
b8744c24fc
commit
3e6d75e1b5
|
@ -28,5 +28,6 @@ extension DataSourceFacade {
|
|||
try await dependency.context.apiService.getBlocked(
|
||||
authenticationBox: authBox
|
||||
)
|
||||
dependency.context.authenticationService.fetchFollowingAndBlockedAsync()
|
||||
} // end func
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ extension DataSourceFacade {
|
|||
user: user,
|
||||
authenticationBox: dependency.authContext.mastodonAuthenticationBox
|
||||
)
|
||||
dependency.context.authenticationService.fetchFollowingAndBlockedAsync()
|
||||
} // end func
|
||||
}
|
||||
|
||||
|
|
|
@ -67,6 +67,16 @@ public final class AuthenticationService: NSObject {
|
|||
return (ids, maxID)
|
||||
}
|
||||
|
||||
public func fetchFollowingAndBlockedAsync() {
|
||||
/// we're dispatching this as a separate async call to not block the callee
|
||||
Task {
|
||||
for authBox in mastodonAuthenticationBoxes {
|
||||
do { try await fetchFollowedBlockedUserIds(authBox) }
|
||||
catch {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public let updateActiveUserAccountPublisher = PassthroughSubject<Void, Never>()
|
||||
|
||||
init(
|
||||
|
|
Loading…
Reference in New Issue