Reduces reliance on presentationMode to dismiss

Bindings are passed instead and this fixes issues with Add Web (etc) only appearing once.
This commit is contained in:
Stuart Breckenridge
2020-08-14 00:04:39 +08:00
parent 7aab8c87fb
commit 0a51508abf
6 changed files with 62 additions and 51 deletions

View File

@@ -0,0 +1,21 @@
//
// SceneNavigationModel.swift
// NetNewsWire
//
// Created by Stuart Breckenridge on 13/8/20.
// Copyright © 2020 Ranchero Software. All rights reserved.
//
import Foundation
class SceneNavigationModel: ObservableObject {
@Published var sheetToShow: SidebarSheets = .none {
didSet {
sheetToShow != .none ? (showSheet = true) : (showSheet = false)
}
}
@Published var showSheet = false
@Published var showShareSheet = false
@Published var showAccountSyncErrorAlert = false
}