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

Add Plugin API -> VisibilityChangedEventHandler #2216

Merged
merged 5 commits into from
Jul 10, 2023
Merged

Add Plugin API -> VisibilityChangedEventHandler #2216

merged 5 commits into from
Jul 10, 2023

Conversation

Odotocodot
Copy link
Contributor

Added a visibility changed event handler to the public api.

Main reason for this is to allow caching in query method without the need of a timer.

@github-actions

This comment has been minimized.

@Odotocodot Odotocodot changed the title Add Plugin API -> VisibiltyChangedEventHandler Add Plugin API -> VisibiltiyChangedEventHandler Jul 3, 2023
@Odotocodot Odotocodot changed the title Add Plugin API -> VisibiltiyChangedEventHandler Add Plugin API -> VisibilityChangedEventHandler Jul 3, 2023
@taooceros
Copy link
Member

Sounds good to me. @JamesNZL you may like this one

@JamesNZL
Copy link
Contributor

JamesNZL commented Jul 4, 2023

Ooh, love it!

@taooceros
Copy link
Member

@jjw24 Maybe we can add this to the recent release. There isn't much code change and should not break anything.

@Odotocodot
Copy link
Contributor Author

@jjw24 Maybe we can add this to the recent release. There isn't much code change and should not break anything.

Was going ask if I did the PR early enough for this to happen 😄

@jjw24
Copy link
Member

jjw24 commented Jul 5, 2023

Yeah I don't see why not. I will take a look soon.
Do you have an example implementing this?

@Odotocodot
Copy link
Contributor Author

Not currently, but I can whip one up quickly if you need?

@jjw24
Copy link
Member

jjw24 commented Jul 5, 2023

Yes please, could you whip one up with quickly, I want to test to see how it works in a plugin.

@Odotocodot
Copy link
Contributor Author

Is this okay?
The changes that it would do for me -> Odotocodot/Flow.Launcher.Plugin.OneNote@bdf213b (Whole File)

@jjw24
Copy link
Member

jjw24 commented Jul 9, 2023

Worth noting, subscribing to this event means the plugin will continue to be subscribed even if it is disabled. This however is a shortcoming of Flow's own disable plugin mechanism so at this stage not much we can do for this feature.

Maybe in the future disabling a plugin should also call System.IDisposable on plugins so they can unsubscribe from this feature.

@jjw24 jjw24 added the enhancement New feature or request label Jul 9, 2023
@jjw24 jjw24 added this to the 1.16.0 milestone Jul 9, 2023
@JohnTheGr8
Copy link
Member

fixed the build problem for you ;)

@Odotocodot
Copy link
Contributor Author

fixed the build problem for you ;)

Thanks! Beat me too it! ;)

@jjw24 jjw24 merged commit 0429cef into Flow-Launcher:dev Jul 10, 2023
2 checks passed
@Odotocodot Odotocodot deleted the feature/VisibilityChanged branch July 25, 2023 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants