mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-26 15:58:07 +00:00
Remove unecessary workaround
This commit is contained in:
parent
fca76849bc
commit
5a8862b1e2
7 changed files with 0 additions and 15 deletions
|
@ -44,7 +44,6 @@ public struct ReportView: View {
|
|||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
Button {
|
||||
isSendingReport = true
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
let _: ReportSent =
|
||||
|
|
|
@ -35,7 +35,6 @@ public struct AccountDetailContextMenu: View {
|
|||
|
||||
if viewModel.relationship?.blocking == true {
|
||||
Button {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
viewModel.relationship = try await client.post(endpoint: Accounts.unblock(id: account.id))
|
||||
|
@ -54,7 +53,6 @@ public struct AccountDetailContextMenu: View {
|
|||
|
||||
if viewModel.relationship?.muting == true {
|
||||
Button {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
viewModel.relationship = try await client.post(endpoint: Accounts.unmute(id: account.id))
|
||||
|
@ -67,7 +65,6 @@ public struct AccountDetailContextMenu: View {
|
|||
Menu {
|
||||
ForEach(Duration.mutingDurations(), id: \.rawValue) { duration in
|
||||
Button(duration.description) {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
viewModel.relationship = try await client.post(endpoint: Accounts.mute(id: account.id, json: MuteData(duration: duration.rawValue)))
|
||||
|
@ -85,7 +82,6 @@ public struct AccountDetailContextMenu: View {
|
|||
{
|
||||
if relationship.notifying {
|
||||
Button {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
viewModel.relationship = try await client.post(endpoint: Accounts.follow(id: account.id,
|
||||
|
@ -98,7 +94,6 @@ public struct AccountDetailContextMenu: View {
|
|||
}
|
||||
} else {
|
||||
Button {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
viewModel.relationship = try await client.post(endpoint: Accounts.follow(id: account.id,
|
||||
|
@ -112,7 +107,6 @@ public struct AccountDetailContextMenu: View {
|
|||
}
|
||||
if relationship.showingReblogs {
|
||||
Button {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
viewModel.relationship = try await client.post(endpoint: Accounts.follow(id: account.id,
|
||||
|
@ -125,7 +119,6 @@ public struct AccountDetailContextMenu: View {
|
|||
}
|
||||
} else {
|
||||
Button {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
viewModel.relationship = try await client.post(endpoint: Accounts.follow(id: account.id,
|
||||
|
|
|
@ -380,7 +380,6 @@ public struct AccountDetailView: View {
|
|||
.confirmationDialog("Block User", isPresented: $showBlockConfirmation) {
|
||||
if let account = viewModel.account {
|
||||
Button("account.action.block-user-\(account.username)", role: .destructive) {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
viewModel.relationship = try await client.post(endpoint: Accounts.block(id: account.id))
|
||||
|
|
|
@ -78,7 +78,6 @@ public struct FiltersListView: View {
|
|||
.background(theme.secondaryBackgroundColor)
|
||||
#endif
|
||||
.task {
|
||||
let client = client
|
||||
do {
|
||||
isLoading = true
|
||||
filters = try await client.get(endpoint: ServerFilters.filters, forceVersion: .v2)
|
||||
|
|
|
@ -103,7 +103,6 @@ public struct AccountDetailMediaGridView: View {
|
|||
}
|
||||
|
||||
private func fetchNextPage() async throws {
|
||||
let client = client
|
||||
let newStatuses: [Status] =
|
||||
try await client.get(endpoint: Accounts.statuses(id: account.id,
|
||||
sinceId: mediaStatuses.last?.id,
|
||||
|
|
|
@ -108,7 +108,6 @@ struct ConversationMessageView: View {
|
|||
Label("status.action.copy-text", systemImage: "doc.on.doc")
|
||||
}
|
||||
Button {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
let status: Status
|
||||
|
@ -127,7 +126,6 @@ struct ConversationMessageView: View {
|
|||
systemImage: isLiked ? "star.fill" : "star")
|
||||
}
|
||||
Button {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
let status: Status
|
||||
|
@ -147,7 +145,6 @@ struct ConversationMessageView: View {
|
|||
Divider()
|
||||
if message.account.id == currentAccount.account?.id {
|
||||
Button("status.action.delete", role: .destructive) {
|
||||
let client = client
|
||||
Task {
|
||||
_ = try await client.delete(endpoint: Statuses.status(id: message.id))
|
||||
}
|
||||
|
|
|
@ -200,7 +200,6 @@ public struct StatusRowView: View {
|
|||
isPresented: $isBlockConfirmationPresented)
|
||||
{
|
||||
Button("account.action.block", role: .destructive) {
|
||||
let client = client
|
||||
Task {
|
||||
do {
|
||||
let operationAccount = viewModel.status.reblog?.account ?? viewModel.status.account
|
||||
|
|
Loading…
Reference in a new issue