-
-
Notifications
You must be signed in to change notification settings - Fork 615
Support Querying Results When Query Text is Empty- Home Page Feature #3399
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
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e0721aa
Add new interfaces
Jack251970 aa0f9b2
Update name
Jack251970 6a4fdcb
Merge branch 'dev' into empty_query
Jack251970 3089928
Support home query interface
Jack251970 0f09fea
Make async home query to be feature interface
Jack251970 17a0834
Support query for plugins with home query interface
Jack251970 54994dd
Initialize home query when window is loaded
Jack251970 e9ef26a
Change related setting names
Jack251970 e833333
Add ui in general page
Jack251970 d6704ed
Support history items
Jack251970 f2f4ebf
Support home state change & Add ui
Jack251970 96bb62a
Refresh interface when Home Page is changed
Jack251970 13cfbe5
Check query results
Jack251970 4500f1d
Fix history items context menu issue
Jack251970 19d7059
Add empty & global query for home page
Jack251970 4ed1dc3
Fix topmost issue in home page
Jack251970 35e4bfc
Improve code quality
Jack251970 ccb1bac
Merge branch 'dev' into empty_query
Jack251970 2ab007b
Fix typos
Jack251970 fe25764
Merge branch 'empty_query' of https://github.com/Jack251970/Flow.Laun…
Jack251970 eaea38c
Fix typos
Jack251970 78f606f
Fix typos
Jack251970 72bd1e6
Remove code comments with issues
Jack251970 0d9fb29
Improve code quality
Jack251970 67facb8
Use non-async version
Jack251970 21d6ec2
Use null to distinguish between home query and global query
Jack251970 28b8cb6
Improve distinguish between home query and global query
Jack251970 135b9b5
Merge branch 'dev' into empty_query
Jack251970 b9aa5a8
Change variable name for code quality
Jack251970 2713c5b
Add code comments
Jack251970 41211e8
Improve code comments
Jack251970 16404bc
Improve log information
Jack251970 36a4f41
Do not need to clear the result when last and current query are home …
Jack251970 0882378
Add Glyph for history items & topmost items
Jack251970 7083849
Remove unused codes
Jack251970 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| using System.Collections.Generic; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace Flow.Launcher.Plugin | ||
| { | ||
| /// <summary> | ||
| /// Asynchronous Query Model for Flow Launcher When Query Text is Empty | ||
| /// </summary> | ||
| public interface IAsyncHomeQuery : IFeatures | ||
| { | ||
| /// <summary> | ||
| /// Asynchronous Querying When Query Text is Empty | ||
| /// </summary> | ||
| /// <para> | ||
| /// If the Querying method requires high IO transmission | ||
| /// or performing CPU intense jobs (performing better with cancellation), please use this IAsyncHomeQuery interface | ||
| /// </para> | ||
| /// <param name="token">Cancel when querying job is obsolete</param> | ||
| /// <returns></returns> | ||
| Task<List<Result>> HomeQueryAsync(CancellationToken token); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| using System.Collections.Generic; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace Flow.Launcher.Plugin | ||
| { | ||
| /// <summary> | ||
| /// Synchronous Query Model for Flow Launcher When Query Text is Empty | ||
| /// <para> | ||
| /// If the Querying method requires high IO transmission | ||
| /// or performing CPU intense jobs (performing better with cancellation), please try the IAsyncHomeQuery interface | ||
| /// </para> | ||
| /// </summary> | ||
| public interface IHomeQuery : IAsyncHomeQuery | ||
| { | ||
| /// <summary> | ||
| /// Querying When Query Text is Empty | ||
| /// <para> | ||
| /// This method will be called within a Task.Run, | ||
| /// so please avoid synchronously wait for long. | ||
| /// </para> | ||
| /// </summary> | ||
| /// <returns></returns> | ||
| List<Result> HomeQuery(); | ||
|
|
||
| Task<List<Result>> IAsyncHomeQuery.HomeQueryAsync(CancellationToken token) => Task.Run(HomeQuery); | ||
|
Jack251970 marked this conversation as resolved.
|
||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.