@@ -9,8 +9,8 @@ namespace Flow.Launcher.Plugin.OneNote.Search
99 public class NotebookExplorer : SearchBase
1010 {
1111 private readonly TitleSearch titleSearch ;
12- public NotebookExplorer ( PluginInitContext context , Settings settings , ResultCreator resultCreator , TitleSearch titleSearch ) : base ( context ,
13- settings , resultCreator , ( ) => settings . Keywords . NotebookExplorer )
12+ public NotebookExplorer ( PluginInitContext context , Settings settings , ResultCreator resultCreator , TitleSearch titleSearch )
13+ : base ( context , settings , resultCreator , settings . Keywords . NotebookExplorer )
1414 {
1515 this . titleSearch = titleSearch ;
1616 }
@@ -22,8 +22,8 @@ public override List<Result> GetResults(string query)
2222
2323 List < Result > results = search switch
2424 {
25- { } when search . StartsWith ( Keywords . TitleSearch ) && parent is not OneNotePage => titleSearch . Filter ( search , parent , collection ) ,
26- { } when search . StartsWith ( Keywords . ScopedSearch ) && parent is INotebookOrSectionGroup => ScopedSearch ( search , parent ) ,
25+ { } when search . StartsWithOrd ( Keywords . TitleSearch ) && parent is not OneNotePage => titleSearch . Filter ( search , parent , collection ) ,
26+ { } when search . StartsWithOrd ( Keywords . ScopedSearch ) && parent is INotebookOrSectionGroup => ScopedSearch ( search , parent ) ,
2727 { } when ! string . IsNullOrWhiteSpace ( search ) => Explorer ( search , parent , collection ) ,
2828 _ => ShowAll ( parent , collection ) ,
2929 } ;
@@ -35,8 +35,8 @@ public override List<Result> GetResults(string query)
3535 result . Title = $ "Open \" { parent . Name } \" in OneNote";
3636 result . SubTitle = search switch
3737 {
38- { } when search . StartsWith ( Keywords . TitleSearch ) => $ "Now searching by title in \" { parent . Name } \" ",
39- { } when search . StartsWith ( Keywords . ScopedSearch ) => $ "Now searching all pages in \" { parent . Name } \" ",
38+ { } when search . StartsWithOrd ( Keywords . TitleSearch ) => $ "Now searching by title in \" { parent . Name } \" ",
39+ { } when search . StartsWithOrd ( Keywords . ScopedSearch ) => $ "Now searching all pages in \" { parent . Name } \" ",
4040 _ => $ "Use \' { Keywords . ScopedSearch } \' to search this item. Use \' { Keywords . TitleSearch } \' to search by title in this item",
4141 } ;
4242
0 commit comments