mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge 2c25734875 into 24f6c90f72
This commit is contained in:
commit
11cf63363d
4 changed files with 35 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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="" />
|
||||
</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="" />
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue