mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-18 02:35:15 +00:00
parent
4870b202d6
commit
cc32845134
3 changed files with 32 additions and 34 deletions
|
@ -115,6 +115,8 @@ struct IceCubesApp: App {
|
|||
popToRootTab: $popToRootTab,
|
||||
tabs: availableTabs)
|
||||
{
|
||||
GeometryReader { _ in
|
||||
HStack(spacing: 0) {
|
||||
ZStack {
|
||||
if selectedTab == .profile {
|
||||
ProfileTab(popToRootTab: $popToRootTab)
|
||||
|
@ -134,15 +136,15 @@ struct IceCubesApp: App {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.inspector(isPresented: .init(get: {
|
||||
appAccountsManager.currentClient.isAuth && userPreferences.showiPadSecondaryColumn
|
||||
}, set: { newValue in
|
||||
userPreferences.showiPadSecondaryColumn = newValue
|
||||
}), content: {
|
||||
if appAccountsManager.currentClient.isAuth,
|
||||
userPreferences.showiPadSecondaryColumn
|
||||
{
|
||||
Divider().edgesIgnoringSafeArea(.all)
|
||||
notificationsSecondaryColumn
|
||||
})
|
||||
.onChange(of: $appAccountsManager.currentAccount.id) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}.onChange(of: $appAccountsManager.currentAccount.id) {
|
||||
sideBarLoadedTabs.removeAll()
|
||||
}
|
||||
.environment(sidebarRouterPath)
|
||||
|
@ -151,8 +153,8 @@ struct IceCubesApp: App {
|
|||
private var notificationsSecondaryColumn: some View {
|
||||
NotificationsTab(popToRootTab: $popToRootTab, lockedType: nil)
|
||||
.environment(\.isSecondaryColumn, true)
|
||||
.frame(maxWidth: .secondaryColumnWidth)
|
||||
.id(appAccountsManager.currentAccount.id)
|
||||
.inspectorColumnWidth(.secondaryColumnWidth)
|
||||
}
|
||||
|
||||
private var tabBarView: some View {
|
||||
|
|
|
@ -75,7 +75,6 @@ public struct NotificationsListView: View {
|
|||
.scrollContentBackground(.hidden)
|
||||
.background(theme.primaryBackgroundColor)
|
||||
.task {
|
||||
if client.isAuth {
|
||||
viewModel.client = client
|
||||
viewModel.currentAccount = account
|
||||
if let lockedType {
|
||||
|
@ -83,7 +82,6 @@ public struct NotificationsListView: View {
|
|||
}
|
||||
await viewModel.fetchNotifications()
|
||||
}
|
||||
}
|
||||
.refreshable {
|
||||
SoundEffectManager.shared.playSound(of: .pull)
|
||||
HapticManager.shared.fireHaptic(of: .dataRefresh(intensity: 0.3))
|
||||
|
|
|
@ -93,8 +93,6 @@ import SwiftUI
|
|||
nextPageState: consolidatedNotifications.isEmpty ? .none : nextPageState)
|
||||
}
|
||||
} catch {
|
||||
let error = error as NSError
|
||||
guard error.code != -999 else { return }
|
||||
state = .error(error: error)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue