Skip to content

Commit 9fbd0a6

Browse files
committed
Cleanup
1 parent 70eb781 commit 9fbd0a6

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

IceCubesApp/App/Tabs/Timeline/TimelineTab.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ struct TimelineTab: View {
6060
timeline = .trending
6161
}
6262
}
63-
Task {
64-
await currentAccount.fetchLists()
65-
}
6663
if !client.isAuth {
6764
routerPath.presentedSheet = .addAccount
6865
}
6966
}
67+
.task {
68+
await currentAccount.fetchLists()
69+
}
7070
.onChange(of: client.isAuth) {
7171
resetTimelineFilter()
7272
}

Packages/Notifications/Sources/Notifications/NotificationsListView.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public struct NotificationsListView: View {
106106
.scrollContentBackground(.hidden)
107107
.background(theme.primaryBackgroundColor)
108108
#endif
109-
.onAppear {
109+
.task {
110110
viewModel.client = client
111111
viewModel.currentAccount = account
112112
if let lockedType {
@@ -117,10 +117,8 @@ public struct NotificationsListView: View {
117117
} else {
118118
viewModel.loadSelectedType()
119119
}
120-
Task {
121-
await viewModel.fetchNotifications(viewModel.selectedType)
122-
await viewModel.fetchPolicy()
123-
}
120+
await viewModel.fetchNotifications(viewModel.selectedType)
121+
await viewModel.fetchPolicy()
124122
}
125123
.refreshable {
126124
SoundEffectManager.shared.playSound(.pull)

0 commit comments

Comments
 (0)