Fix action on notify menu in account detail

This commit is contained in:
Thomas Ricouard 2023-02-05 21:46:21 +01:00
parent 0af60c4b1e
commit b598434648
1 changed files with 6 additions and 2 deletions

View File

@ -436,7 +436,9 @@ public struct AccountDetailView: View {
Button {
Task {
do {
viewModel.relationship = try await client.post(endpoint: Accounts.unmute(id: account.id))
viewModel.relationship = try await client.post(endpoint: Accounts.follow(id: account.id,
notify: false,
reblogs: relationship.showingReblogs))
} catch {
print("Error while disabling notifications: \(error.localizedDescription)")
}
@ -448,7 +450,9 @@ public struct AccountDetailView: View {
Button {
Task {
do {
viewModel.relationship = try await client.post(endpoint: Accounts.mute(id: account.id))
viewModel.relationship = try await client.post(endpoint: Accounts.follow(id: account.id,
notify: true,
reblogs: relationship.showingReblogs))
} catch {
print("Error while enabling notifications: \(error.localizedDescription)")
}