Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PTRun] Allow preventing usage based ordering results #37491

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Allow preventing selected result data retrieval
  • Loading branch information
CoreyHayward committed Feb 16, 2025
commit 3057cdcf2c3d26e6c095e78f9de8568d7a7b989b
6 changes: 6 additions & 0 deletions src/modules/launcher/Wox.Plugin/Result.cs
Original file line number Diff line number Diff line change
@@ -187,5 +187,11 @@ public override string ToString()
/// Gets plugin ID that generated this result
/// </summary>
public string PluginID { get; internal set; }

/// <summary>
/// Gets or sets a value indicating whether the selected data should be applied to this result.
/// </summary>
/// <remarks>Enabling this option will affect the sort ordering of this result</remarks>
public bool DisableSelectedDataRetrieval { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/modules/launcher/Wox.Plugin/UserSelectedRecord.cs
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ public UserSelectedRecordItem GetSelectedData(Result result)
{
ArgumentNullException.ThrowIfNull(result);

if (result != null && Records.TryGetValue(result.ToString(), out var value))
if (result != null && !result.DisableSelectedDataRetrieval && Records.TryGetValue(result.ToString(), out var value))
{
return value;
}