Skip to content

Commit 0df9f37

Browse files
committed
Rename variables
1 parent 428efb1 commit 0df9f37

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal static Result CreateFolderResult(string title, string subtitle, string
2828
TitleHighlightData = StringMatcher.FuzzySearch(query.Search, title).MatchData,
2929
Action = c =>
3030
{
31-
if (c.SpecialKeyState.CtrlPressed || (!Settings.EnabledPathSearchKeyword && !Settings.EnabledSearchActionKeyword))
31+
if (c.SpecialKeyState.CtrlPressed || (!Settings.PathSearchKeywordEnabled && !Settings.SearchActionKeywordEnabled))
3232
{
3333
try
3434
{
@@ -42,7 +42,7 @@ internal static Result CreateFolderResult(string title, string subtitle, string
4242
}
4343
}
4444
// one of it is enabled
45-
var keyword = Settings.EnabledSearchActionKeyword ? Settings.SearchActionKeyword : Settings.PathSearchActionKeyword;
45+
var keyword = Settings.SearchActionKeywordEnabled ? Settings.SearchActionKeyword : Settings.PathSearchActionKeyword;
4646

4747
keyword = keyword == Query.GlobalPluginWildcardSign ? string.Empty : keyword + " ";
4848

Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ private bool ActionKeywordMatch(Query query, Settings.ActionKeyword allowedActio
7171

7272
return allowedActionKeyword switch
7373
{
74-
Settings.ActionKeyword.SearchActionKeyword => settings.EnabledSearchActionKeyword &&
74+
Settings.ActionKeyword.SearchActionKeyword => settings.SearchActionKeywordEnabled &&
7575
keyword == settings.SearchActionKeyword,
76-
Settings.ActionKeyword.PathSearchActionKeyword => settings.EnabledPathSearchKeyword &&
76+
Settings.ActionKeyword.PathSearchActionKeyword => settings.PathSearchKeywordEnabled &&
7777
keyword == settings.PathSearchActionKeyword,
7878
Settings.ActionKeyword.FileContentSearchActionKeyword => keyword ==
7979
settings.FileContentSearchActionKeyword,
80-
Settings.ActionKeyword.IndexSearchActionKeyword => settings.EnabledIndexOnlySearchKeyword &&
80+
Settings.ActionKeyword.IndexSearchActionKeyword => settings.IndexOnlySearchKeywordEnabled &&
8181
keyword == settings.IndexSearchActionKeyword
8282
};
8383
}

Plugins/Flow.Launcher.Plugin.Explorer/Settings.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ public class Settings
2121
public List<AccessLink> IndexSearchExcludedSubdirectoryPaths { get; set; } = new List<AccessLink>();
2222

2323
public string SearchActionKeyword { get; set; } = Query.GlobalPluginWildcardSign;
24-
public bool EnabledSearchActionKeyword { get; set; } = true;
24+
public bool SearchActionKeywordEnabled { get; set; } = true;
2525

2626
public string FileContentSearchActionKeyword { get; set; } = Constants.DefaultContentSearchActionKeyword;
2727

2828
public string PathSearchActionKeyword { get; set; } = Query.GlobalPluginWildcardSign;
2929

30-
public bool EnabledPathSearchKeyword { get; set; }
30+
public bool PathSearchKeywordEnabled { get; set; }
3131

3232
public string IndexSearchActionKeyword { get; set; } = Query.GlobalPluginWildcardSign;
3333

34-
public bool EnabledIndexOnlySearchKeyword { get; set; }
34+
public bool IndexOnlySearchKeywordEnabled { get; set; }
3535

3636
internal enum ActionKeyword
3737
{
@@ -60,17 +60,17 @@ internal enum ActionKeyword
6060

6161
internal bool? GetActionKeywordEnable(ActionKeyword actionKeyword) => actionKeyword switch
6262
{
63-
ActionKeyword.SearchActionKeyword => EnabledSearchActionKeyword,
64-
ActionKeyword.PathSearchActionKeyword => EnabledPathSearchKeyword,
65-
ActionKeyword.IndexSearchActionKeyword => EnabledIndexOnlySearchKeyword,
63+
ActionKeyword.SearchActionKeyword => SearchActionKeywordEnabled,
64+
ActionKeyword.PathSearchActionKeyword => PathSearchKeywordEnabled,
65+
ActionKeyword.IndexSearchActionKeyword => IndexOnlySearchKeywordEnabled,
6666
_ => null
6767
};
6868

6969
internal void SetActionKeywordEnable(ActionKeyword actionKeyword, bool enable) => _ = actionKeyword switch
7070
{
71-
ActionKeyword.SearchActionKeyword => EnabledSearchActionKeyword = enable,
72-
ActionKeyword.PathSearchActionKeyword => EnabledPathSearchKeyword = enable,
73-
ActionKeyword.IndexSearchActionKeyword => EnabledIndexOnlySearchKeyword = enable,
71+
ActionKeyword.SearchActionKeyword => SearchActionKeywordEnabled = enable,
72+
ActionKeyword.PathSearchActionKeyword => PathSearchKeywordEnabled = enable,
73+
ActionKeyword.IndexSearchActionKeyword => IndexOnlySearchKeywordEnabled = enable,
7474
_ => throw new ArgumentOutOfRangeException(nameof(actionKeyword), actionKeyword, "Unexpected property")
7575
};
7676
}

0 commit comments

Comments
 (0)