refactor: remove memo manager

This commit is contained in:
dscyrescotti
2024-07-14 17:03:27 +07:00
parent a286f7d853
commit c1e2fa227e
7 changed files with 31 additions and 51 deletions

View File

@@ -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)