We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have checked that this issue has not already been reported.
I am using the latest version of Flow Launcher.
I have developed a plugin, and I seem to meet some issue with the ranking sequence of the query results.
I implement the IAsyncPlugin interface and when I load clear actions, the ranking sequence of the items is like this.
These are my C# codes, I have set the score of the clear list item to 4, but the item is on the bottom instead of the top?🧐
public Task<List<Result>> QueryAsync(Query query, CancellationToken token) { return Task.Run(() => Query(query)); } public List<Result> Query(Query query) { var results = new List<Result>(); if (query.FirstSearch == Settings.ClearKeyword) { // clear actions results.AddRange( new[] { // clear list item new Result { Title = Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_list_title"), SubTitle = Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_list_subtitle"), IcoPath = PathHelper.ListIconPath, Glyph = ResourceHelper.ListGlyph, Score = 4, Action = _ => { var number = DeleteAllRecordsFromList(); if (number != 0) { Context.API.ShowMsg(Context.GetTranslation("flowlauncher_plugin_clipboardplus_success"), string.Format( Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_list_msg_subtitle"), number)); return true; } else { Context.API.ShowMsg(Context.GetTranslation("flowlauncher_plugin_clipboardplus_success"), Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_fail_msg_subtitle")); return false; } }, }, // clear both item new Result { Title = Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_both_title"), SubTitle = Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_both_subtitle"), IcoPath = PathHelper.DatabaseIconPath, Glyph = ResourceHelper.DatabaseGlyph, Score = 3, AsyncAction = async _ => { var number = await DeleteAllRecordsFromListDatabaseAsync(); if (number != 0) { Context.API.ShowMsg(Context.GetTranslation("flowlauncher_plugin_clipboardplus_success"), string.Format( Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_both_msg_subtitle"), number)); return true; } else { Context.API.ShowMsg(Context.GetTranslation("flowlauncher_plugin_clipboardplus_success"), Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_fail_msg_subtitle")); return false; } } }, // clear pinned item new Result { Title = Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_unpin_title"), SubTitle = Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_unpin_subtitle"), IcoPath = PathHelper.UnpinIcon1Path, Glyph = ResourceHelper.UnpinGlyph, Score = 2, AsyncAction = async _ => { var number = await DeleteUnpinnedRecordsFromListDatabaseAsync(); if (number != 0) { Context.API.ShowMsg(Context.GetTranslation("flowlauncher_plugin_clipboardplus_success"), string.Format( Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_unpin_msg_subtitle"), number)); return true; } else { Context.API.ShowMsg(Context.GetTranslation("flowlauncher_plugin_clipboardplus_success"), Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_fail_msg_subtitle")); return false; } } }, // clear invalid item new Result { Title = Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_invalid_title"), SubTitle = Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_invalid_subtitle"), IcoPath = PathHelper.ErrorIconPath, Glyph = ResourceHelper.ErrorGlyph, Score = 1, AsyncAction = async _ => { var number = await DeleteInvalidRecordsFromListDatabaseAsync(); if (number != 0) { Context.API.ShowMsg(Context.GetTranslation("flowlauncher_plugin_clipboardplus_success"), string.Format( Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_invalid_msg_subtitle"), number)); return true; } else { Context.API.ShowMsg(Context.GetTranslation("flowlauncher_plugin_clipboardplus_success"), Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_fail_msg_subtitle")); return false; } } } } ); } else { // clear action results.Add( new Result { Title = Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_title"), SubTitle = Context.GetTranslation("flowlauncher_plugin_clipboardplus_clear_subtitle"), IcoPath = PathHelper.ClearIconPath, Glyph = ResourceHelper.ClearGlyph, Score = SettingsViewModel.MaximumMaxRecords + 1, Action = _ => { Context.API.ChangeQuery($"{query.ActionKeyword} {Settings.ClearKeyword} ", true); return false; }, } ); // records results ... } return results; }
I really don't know why this issue happens.
No response
1.19.0
10.0.22631.4037
The text was updated successfully, but these errors were encountered:
Try setting them a bit further apart, 50, 100, 150 so on. Flow itself will also add to the score based on the frequency of the result used.
Sorry, something went wrong.
Thanks, I get it.
Feature is now available in prerelease. Can turn selection count off via result class. #3144
No branches or pull requests
Checks
I have checked that this issue has not already been reported.
I am using the latest version of Flow Launcher.
Problem Description
I have developed a plugin, and I seem to meet some issue with the ranking sequence of the query results.
I implement the IAsyncPlugin interface and when I load clear actions, the ranking sequence of the items is like this.
These are my C# codes, I have set the score of the clear list item to 4, but the item is on the bottom instead of the top?🧐
I really don't know why this issue happens.
To Reproduce
No response
Screenshots
No response
Flow Launcher Version
1.19.0
Windows Build Number
10.0.22631.4037
Error Log
No response
The text was updated successfully, but these errors were encountered: