Cleanup isSecondaryColumn
This commit is contained in:
parent
d2c520d306
commit
941618686c
|
@ -118,7 +118,7 @@ struct IceCubesApp: App {
|
|||
if proxy.frame(in: .global).width > (.maxColumnWidth + .secondaryColumnWidth),
|
||||
currentAccount.account?.id != nil {
|
||||
Divider().edgesIgnoringSafeArea(.all)
|
||||
NotificationsTab(popToRootTab: $popToRootTab, lockedType: nil, isSecondaryColumn: true)
|
||||
NotificationsTab(popToRootTab: $popToRootTab, lockedType: nil)
|
||||
.environment(\.isSecondaryColumn, true)
|
||||
.frame(maxWidth: 360)
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ import SwiftUI
|
|||
import Timeline
|
||||
|
||||
struct NotificationsTab: View {
|
||||
@Environment(\.isSecondaryColumn) private var isSecondaryColumn: Bool
|
||||
|
||||
@EnvironmentObject private var theme: Theme
|
||||
@EnvironmentObject private var client: Client
|
||||
@EnvironmentObject private var watcher: StreamWatcher
|
||||
|
@ -18,7 +20,6 @@ struct NotificationsTab: View {
|
|||
@Binding var popToRootTab: Tab
|
||||
|
||||
let lockedType: Models.Notification.NotificationType?
|
||||
let isSecondaryColumn: Bool
|
||||
|
||||
var body: some View {
|
||||
NavigationStack(path: $routerPath.path) {
|
||||
|
|
|
@ -37,9 +37,9 @@ enum Tab: Int, Identifiable, Hashable {
|
|||
case .federated:
|
||||
TimelineTab(popToRootTab: popToRootTab, timeline: .federated)
|
||||
case .notifications:
|
||||
NotificationsTab(popToRootTab: popToRootTab, lockedType: nil, isSecondaryColumn: false)
|
||||
NotificationsTab(popToRootTab: popToRootTab, lockedType: nil)
|
||||
case .mentions:
|
||||
NotificationsTab(popToRootTab: popToRootTab, lockedType: .mention, isSecondaryColumn: false)
|
||||
NotificationsTab(popToRootTab: popToRootTab, lockedType: .mention)
|
||||
case .explore:
|
||||
ExploreTab(popToRootTab: popToRootTab)
|
||||
case .messages:
|
||||
|
|
Loading…
Reference in New Issue