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

View file

@ -436,7 +436,9 @@ public struct AccountDetailView: View {
Button { Button {
Task { Task {
do { 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 { } catch {
print("Error while disabling notifications: \(error.localizedDescription)") print("Error while disabling notifications: \(error.localizedDescription)")
} }
@ -448,7 +450,9 @@ public struct AccountDetailView: View {
Button { Button {
Task { Task {
do { 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 { } catch {
print("Error while enabling notifications: \(error.localizedDescription)") print("Error while enabling notifications: \(error.localizedDescription)")
} }