mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-03 18:57:46 +01:00
feat: Update block/mutes on block/mute action
This commit is contained in:
parent
b1d92c69bd
commit
bb30aae322
@ -16,10 +16,17 @@ extension DataSourceFacade {
|
||||
) async throws {
|
||||
let selectionFeedbackGenerator = await UISelectionFeedbackGenerator()
|
||||
await selectionFeedbackGenerator.selectionChanged()
|
||||
|
||||
_ = try await dependency.context.apiService.toggleBlock(
|
||||
|
||||
let apiService = dependency.context.apiService
|
||||
let authBox = dependency.authContext.mastodonAuthenticationBox
|
||||
|
||||
_ = try await apiService.toggleBlock(
|
||||
user: user,
|
||||
authenticationBox: dependency.authContext.mastodonAuthenticationBox
|
||||
authenticationBox: authBox
|
||||
)
|
||||
|
||||
try await dependency.context.apiService.getBlocked(
|
||||
authenticationBox: authBox
|
||||
)
|
||||
} // end func
|
||||
}
|
||||
|
@ -97,6 +97,7 @@ extension APIService {
|
||||
accountID: muteContext.targetUserID,
|
||||
authorization: authenticationBox.userAuthorization
|
||||
).singleOutput()
|
||||
try await getMutes(authenticationBox: authenticationBox)
|
||||
result = .success(response)
|
||||
} else {
|
||||
let response = try await Mastodon.API.Account.mute(
|
||||
@ -105,6 +106,7 @@ extension APIService {
|
||||
accountID: muteContext.targetUserID,
|
||||
authorization: authenticationBox.userAuthorization
|
||||
).singleOutput()
|
||||
try await getMutes(authenticationBox: authenticationBox)
|
||||
result = .success(response)
|
||||
}
|
||||
} catch {
|
||||
|
Loading…
x
Reference in New Issue
Block a user