Skip to content

Conversation

@taooceros
Copy link
Member

Dispose Disposable or AsyncDisposable plugin on mainwindow close

@jjw24
Copy link
Member

jjw24 commented Jul 5, 2021

What's the impact this issue is causing currently?

@taooceros
Copy link
Member Author

We currently don't have a strategy to let plugins know Flow is closing. This will allow plugins to do something when Flow is exiting.

@jjw24
Copy link
Member

jjw24 commented Jul 5, 2021

Ok cool, but otherwise no issues caused right?

@taooceros
Copy link
Member Author

Ok cool, but otherwise no issues caused right?

The ClipBoard plugin? It is causing Flow hang while exiting

@jjw24
Copy link
Member

jjw24 commented Jul 5, 2021

I remmeber seeing some plugins inherit the IDisposable interface, do we currently have no implementation of it?

@taooceros
Copy link
Member Author

I remmeber seeing some plugins inherit the IDisposable interface, do we currently have no implementation of it?

I don't think so. Probably what you remember is ISavable?

@jjw24
Copy link
Member

jjw24 commented Jul 5, 2021

Hmm ok , I'm afk but that's fine.

@jjw24
Copy link
Member

jjw24 commented Jul 5, 2021

I saw your issue in Xenolphthalein/Flow.Launcher.Plugin.ClipboardHistory#4, maybe update that issue to let @Xenolphthalein know how to use it to fix the problem.

@taooceros
Copy link
Member Author

taooceros commented Jul 5, 2021

By the way, I think we really need to update the plugin development tutorial after the release of 1.8.0. Quite a lot new features are added, and some old features are not documented (like IReloadable, IResultUpdated, etc.)

@jjw24
Copy link
Member

jjw24 commented Jul 5, 2021

By the way, I think we really need to update the plugin development tutorial after the release of 1.8.0. Quite a lot new features are added, and some old features are not documented (like IReloadable, IResultUpdated, etc.)

Oh yeah, for sure

@jjw24
Copy link
Member

jjw24 commented Jul 5, 2021

Going to be a lot of writing 😂

}

private void OnClosing(object sender, CancelEventArgs e)
private async void OnClosing(object sender, CancelEventArgs e)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when user use sys command exit, will it route the call here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sys exit will call MainWindow.Close()

@jjw24 jjw24 added the bug Something isn't working label Jul 5, 2021
@jjw24 jjw24 merged commit 55e985f into Flow-Launcher:dev Jul 5, 2021
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