From 0e0e904d69831e053681735c5a2d75485fc24f99 Mon Sep 17 00:00:00 2001 From: glushchenko Date: Fri, 9 Aug 2024 17:19:07 +0300 Subject: [PATCH] - Fixes notes creation --- FSNotes.xcodeproj/project.pbxproj | 8 ++++---- FSNotes/Business/SearchQuery.swift | 5 +++++ FSNotes/EditorViewController.swift | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/FSNotes.xcodeproj/project.pbxproj b/FSNotes.xcodeproj/project.pbxproj index 58ac1da4a..e3e07c1d4 100644 --- a/FSNotes.xcodeproj/project.pbxproj +++ b/FSNotes.xcodeproj/project.pbxproj @@ -4582,7 +4582,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 635; + CURRENT_PROJECT_VERSION = 636; DEVELOPMENT_TEAM = 866P6MTE92; EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES; ENABLE_HARDENED_RUNTIME = YES; @@ -4599,7 +4599,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 6.9.0; + MARKETING_VERSION = 6.9.1; OTHER_SWIFT_FLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = co.fluder.FSNotes; PRODUCT_NAME = FSNotes; @@ -4622,7 +4622,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 635; + CURRENT_PROJECT_VERSION = 636; DEPLOYMENT_LOCATION = NO; DEVELOPMENT_TEAM = 866P6MTE92; EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES; @@ -4640,7 +4640,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 6.9.0; + MARKETING_VERSION = 6.9.1; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = co.fluder.FSNotes; PRODUCT_NAME = FSNotes; diff --git a/FSNotes/Business/SearchQuery.swift b/FSNotes/Business/SearchQuery.swift index 01453e508..fb8b59bed 100644 --- a/FSNotes/Business/SearchQuery.swift +++ b/FSNotes/Business/SearchQuery.swift @@ -84,4 +84,9 @@ class SearchQuery { return true } + + public func dropFilter() { + self.terms = nil + self.filter = String() + } } diff --git a/FSNotes/EditorViewController.swift b/FSNotes/EditorViewController.swift index 54cbaecb2..263941d51 100644 --- a/FSNotes/EditorViewController.swift +++ b/FSNotes/EditorViewController.swift @@ -1494,6 +1494,7 @@ class EditorViewController: NSViewController, NSTextViewDelegate, NSMenuItemVali disablePreview() vc.notesTableView.deselectNotes() + vc.storage.searchQuery.dropFilter() vc.editor.string = text vc.editor.note = note vc.search.stringValue.removeAll()