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

Implement a few small improvements #13

Merged
merged 2 commits into from
Dec 29, 2024
Merged

Conversation

Yusyuriv
Copy link

@Yusyuriv Yusyuriv commented Dec 29, 2024

  • Removed unused imports
  • Simplified some code, such as remembering the plugin directory path and prepending it to result icons — there's no need for that, plugin icons can use relative paths
  • Made the plugin async and added debouncing (300 ms). Also passed the cancellation token down to other functions so the network requests and parsing their results can also be cancelled if the user types something during the request.
  • Title and URL are now displayed decoded. I save the decoded title directly in the GoogleSearchResult class because it isn't used anywhere other than for displaying the result in UI. URL is used when opening it in a browser, and the encoded URL might behave differently than decoded, so I left it as is and added a new getter in GoogleSearchResult class instead. This getter returns the decoded URL. Below are before and after screenshots.

Before:
Flow Launcher_9MEt6AYysw

After:
Flow Launcher_afWdSBzbv4

@jjw24 jjw24 added the bug Something isn't working label Dec 29, 2024
@jjw24 jjw24 merged commit 55e1659 into jjw24:master Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants