mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-24 08:00:38 +00:00
Cleanup
This commit is contained in:
parent
07bbd6dc13
commit
ce27e4dda5
2 changed files with 13 additions and 13 deletions
|
@ -81,10 +81,12 @@ struct NotificationsTab: View {
|
|||
|
||||
private func clearNotifications() {
|
||||
if selectedTab == .notifications || isSecondaryColumn {
|
||||
if let token = appAccount.currentAccount.oauthToken {
|
||||
if let token = appAccount.currentAccount.oauthToken, userPreferences.notificationsCount[token] ?? 0 > 0 {
|
||||
userPreferences.notificationsCount[token] = 0
|
||||
}
|
||||
watcher.unreadNotificationsCount = 0
|
||||
if watcher.unreadNotificationsCount > 0 {
|
||||
watcher.unreadNotificationsCount = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,19 +29,17 @@ public struct NotificationsListView: View {
|
|||
}
|
||||
|
||||
public var body: some View {
|
||||
ScrollViewReader { proxy in
|
||||
List {
|
||||
scrollToTopView
|
||||
topPaddingView
|
||||
if lockedAccountId == nil, let summary = viewModel.policy?.summary {
|
||||
NotificationsHeaderFilteredView(filteredNotifications: summary)
|
||||
}
|
||||
notificationsView
|
||||
List {
|
||||
scrollToTopView
|
||||
topPaddingView
|
||||
if lockedAccountId == nil, let summary = viewModel.policy?.summary {
|
||||
NotificationsHeaderFilteredView(filteredNotifications: summary)
|
||||
}
|
||||
.id(account.account?.id)
|
||||
.environment(\.defaultMinListRowHeight, 1)
|
||||
.listStyle(.plain)
|
||||
notificationsView
|
||||
}
|
||||
.id(account.account?.id)
|
||||
.environment(\.defaultMinListRowHeight, 1)
|
||||
.listStyle(.plain)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .principal) {
|
||||
let title = lockedType?.menuTitle() ?? viewModel.selectedType?.menuTitle() ?? "notifications.navigation-title"
|
||||
|
|
Loading…
Reference in a new issue