mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Somewhat working file tray
This commit is contained in:
parent
4c7e79b954
commit
30422c3d95
29 changed files with 4032 additions and 65 deletions
|
|
@ -9,6 +9,7 @@ import Combine
|
|||
import Defaults
|
||||
import SwiftUI
|
||||
|
||||
@MainActor
|
||||
class DynamicIslandViewModel: NSObject, ObservableObject {
|
||||
@ObservedObject var coordinator = DynamicIslandViewCoordinator.shared
|
||||
@ObservedObject var detector = FullscreenMediaDetector.shared
|
||||
|
|
@ -45,6 +46,7 @@ class DynamicIslandViewModel: NSObject, ObservableObject {
|
|||
@Published var notchSize: CGSize = getClosedNotchSize()
|
||||
@Published var closedNotchSize: CGSize = getClosedNotchSize()
|
||||
|
||||
@MainActor
|
||||
deinit {
|
||||
destroy()
|
||||
}
|
||||
|
|
@ -282,7 +284,7 @@ class DynamicIslandViewModel: NSObject, ObservableObject {
|
|||
|
||||
// Set the current view to shelf if it contains files and the user enables openShelfByDefault
|
||||
// Otherwise, if the user has not enabled openLastShelfByDefault, set the view to home
|
||||
if !TrayDrop.shared.isEmpty && Defaults[.openShelfByDefault] {
|
||||
if !ShelfStateViewModel.shared.isEmpty && Defaults[.openShelfByDefault] {
|
||||
coordinator.currentView = .shelf
|
||||
} else if !coordinator.openLastTabByDefault {
|
||||
coordinator.currentView = .home
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue