Compare commits

...

11 commits

Author SHA1 Message Date
Diego Henrique
a07a578ded
Merge 63b492aa92 into 73f657f84e 2026-02-24 14:55:11 +08:00
Jack Ye
63b492aa92
Merge branch 'dev' into feature/topmost_automatically 2026-02-05 20:32:52 +08:00
01Dri
e5414d97da name changes 2025-12-15 11:30:46 -03:00
Diego Henrique
c808488ee0
Update Flow.Launcher.Infrastructure/UserSettings/Settings.cs
Co-authored-by: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com>
2025-12-15 11:22:57 -03:00
01Dri
0c9bd7fcab name changes 2025-12-15 09:56:12 -03:00
01Dri
693ca2b436 code clean 2025-12-14 19:03:26 -03:00
01Dri
98c2adb12d remove test code 2025-12-14 19:02:26 -03:00
01Dri
492321072c doc 2025-12-14 18:54:14 -03:00
01Dri
8138e71d51 top most option dynamic resource 2025-12-13 22:09:06 -03:00
01Dri
c0b4c67399 Topmost option in interface 2025-12-13 22:08:54 -03:00
01Dri
72ff6034e7 TopMost option 2025-12-13 22:08:42 -03:00
4 changed files with 35 additions and 2 deletions

View file

@ -497,6 +497,21 @@ namespace Flow.Launcher.Infrastructure.UserSettings
}
}
private bool _autoTopmostLastOpenedResults = false;
public bool AutoTopmostLastOpenedResult
{
get => _autoTopmostLastOpenedResults;
set
{
if (_autoTopmostLastOpenedResults != value)
{
_autoTopmostLastOpenedResults = value;
OnPropertyChanged();
}
}
}
public bool SearchQueryResultsWithDelay { get; set; }
public int SearchDelayTime { get; set; } = 150;

View file

@ -179,6 +179,8 @@
<system:String x:Key="homeToggleBoxToolTip">This can only be edited if plugin supports Home feature and Home Page is enabled.</system:String>
<system:String x:Key="showAtTopmost">Show Search Window at Foremost</system:String>
<system:String x:Key="showAtTopmostToolTip">Overrides other programs' 'Always on Top' setting and displays Flow in the foremost position.</system:String>
<system:String x:Key="autoTopmostLastOpenedResult">Auto Topmost Results</system:String>
<system:String x:Key="autoTopmostLastOpenedResultToolTip">Automatically mark selected results as topmost in their queries for faster access in future searches.</system:String>
<system:String x:Key="autoRestartAfterChanging">Restart after modifying plugin via Plugin Store</system:String>
<system:String x:Key="autoRestartAfterChangingToolTip">Restart Flow Launcher automatically after installing/uninstalling/updating plugin via Plugin Store</system:String>
<system:String x:Key="showUnknownSourceWarning">Show unknown source warning</system:String>

View file

@ -106,6 +106,20 @@
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>
<ui:SettingsCard
Margin="0 4 0 0"
Description="{DynamicResource autoTopmostLastOpenedResultToolTip}"
Header="{DynamicResource autoTopmostLastOpenedResult}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xf5ed;" />
</ui:SettingsCard.HeaderIcon>
<ui:ToggleSwitch
IsOn="{Binding Settings.AutoTopmostLastOpenedResult}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</ui:SettingsCard>
<ui:SettingsCard Margin="0 4 0 0" Header="{DynamicResource SearchWindowPosition}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Glyph="&#xe7f4;" />

View file

@ -545,12 +545,14 @@ namespace Flow.Launcher.ViewModel
// Record user selected result for result ranking
_userSelectedRecord.Add(result);
// Add item to history only if it is from results but not context menu or history
// Add item to history and topmost only if it is from results but not context menu or history
if (queryResultsSelected)
{
_history.Add(result);
lastHistoryIndex = 1;
}
if (Settings.AutoTopmostLastOpenedResult)
_topMostRecord.AddOrUpdate(result);
}
}
private static IReadOnlyList<Result> DeepCloneResults(IReadOnlyList<Result> results, bool isDialogJump, CancellationToken token = default)