mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-04-23 00:58:39 +02:00
refactor: remove memo manager
This commit is contained in:
@@ -9,9 +9,24 @@ import Combine
|
||||
import SwiftUI
|
||||
|
||||
final class Application: NSObject, ObservableObject {
|
||||
@Published var memoObject: MemoObject?
|
||||
@Published private(set) var sidebarVisibility: SidebarVisibility = .shown
|
||||
}
|
||||
|
||||
extension Application {
|
||||
func openMemo(_ memoObject: MemoObject?) {
|
||||
withAnimation(.easeOut) {
|
||||
self.memoObject = memoObject
|
||||
}
|
||||
}
|
||||
|
||||
func closeMemo() {
|
||||
withAnimation(.easeOut) {
|
||||
self.memoObject = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Application {
|
||||
func activateSearchBar() {
|
||||
#if os(macOS)
|
||||
|
||||
Reference in New Issue
Block a user