mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-16 17:55:13 +00:00
Cleanup
This commit is contained in:
parent
70eb781407
commit
9fbd0a6a2f
2 changed files with 6 additions and 8 deletions
|
@ -60,13 +60,13 @@ struct TimelineTab: View {
|
||||||
timeline = .trending
|
timeline = .trending
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Task {
|
|
||||||
await currentAccount.fetchLists()
|
|
||||||
}
|
|
||||||
if !client.isAuth {
|
if !client.isAuth {
|
||||||
routerPath.presentedSheet = .addAccount
|
routerPath.presentedSheet = .addAccount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.task {
|
||||||
|
await currentAccount.fetchLists()
|
||||||
|
}
|
||||||
.onChange(of: client.isAuth) {
|
.onChange(of: client.isAuth) {
|
||||||
resetTimelineFilter()
|
resetTimelineFilter()
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ public struct NotificationsListView: View {
|
||||||
.scrollContentBackground(.hidden)
|
.scrollContentBackground(.hidden)
|
||||||
.background(theme.primaryBackgroundColor)
|
.background(theme.primaryBackgroundColor)
|
||||||
#endif
|
#endif
|
||||||
.onAppear {
|
.task {
|
||||||
viewModel.client = client
|
viewModel.client = client
|
||||||
viewModel.currentAccount = account
|
viewModel.currentAccount = account
|
||||||
if let lockedType {
|
if let lockedType {
|
||||||
|
@ -117,11 +117,9 @@ public struct NotificationsListView: View {
|
||||||
} else {
|
} else {
|
||||||
viewModel.loadSelectedType()
|
viewModel.loadSelectedType()
|
||||||
}
|
}
|
||||||
Task {
|
|
||||||
await viewModel.fetchNotifications(viewModel.selectedType)
|
await viewModel.fetchNotifications(viewModel.selectedType)
|
||||||
await viewModel.fetchPolicy()
|
await viewModel.fetchPolicy()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.refreshable {
|
.refreshable {
|
||||||
SoundEffectManager.shared.playSound(.pull)
|
SoundEffectManager.shared.playSound(.pull)
|
||||||
HapticManager.shared.fireHaptic(.dataRefresh(intensity: 0.3))
|
HapticManager.shared.fireHaptic(.dataRefresh(intensity: 0.3))
|
||||||
|
|
Loading…
Reference in a new issue