Skip to content
New issue

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

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

Already on GitHub? # to your account

Make async function actually async #5151

Merged
merged 1 commit into from
Jan 22, 2025
Merged

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Jan 22, 2025

Change

Move to a background thread when running FindPackagesAsync to make it actually asynchronous.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner January 22, 2025 17:20
@JohnMcPMS JohnMcPMS merged commit 0daa420 into microsoft:master Jan 22, 2025
9 checks passed
@JohnMcPMS JohnMcPMS deleted the move-store branch January 22, 2025 22:38
zadjii-msft added a commit to zadjii-msft/PowerToys that referenced this pull request Jan 24, 2025
_targets #355_, which I need for improvements to messages

* [x] The initial package load takes a long time. This is pretty much unavoidable, but we do it on cmdpal startup, so anything after about 12s should be snappy
* [x] I cannot for the life of me get `FindPackagesAsync`, to be async. The call always ends up running synchronously, so I can't hook up the `operation.Completed` event, nor the cancellation. The action is already complete! 
  - this is probably blocking, because we still end up doing a search on most keystrokes, so we only get the final results after all the intermediate ones are done. 
  - Just pasting a search though? Just as snappy as you'd hope. 
  - Ahahahaha it wasn't me: [microsoft/winget-cli#5151](microsoft/winget-cli#5151)
  - ✅ manually wrapping this in a BG thread made it better
* [ ] We probably shouldn't make the default action for an installed package "Uninstall". 
  - Probably want to shunt over to the Settings app for the package
  - We probably want to do the thing where the second command doesn't show up if it's a separator
  - Punt? punt
* [x] We need to add more metadata in the details for packages. We have it, if only we could show it: #95 
  - This will be a follow-up
* [ ] This needs localization too
* I'm using the `1.10-preview` of the winget com interfaces. On my framework laptop at least, the `RefreshPackageCatalogAsync` API isn't yet implemented, so I need to test that
* [x] I don't think we implemented `MoreCommands` being observable in the host yet. We should.
  - Punted, #360 
* [ ] I probably also need to check if other APIs we're using exist or not
* [x] I haven't tested situations that like, need you to accept a license? Installing `nano` and the NanoLeaf app both _just work_. 
  - Punted?
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants