elementary / appcenter

Pay-what-you-can app store for elementary OS
https://elementary.io
GNU General Public License v3.0
541 stars 100 forks source link

FlatpakBackend: set action enabled in main thread #2187

Closed danirabbit closed 1 week ago

danirabbit commented 1 week ago

Accidentally introduced a crash in #2181

davidmhewitt commented 1 week ago

I'm reviewing on my phone so it's hard to see the full context. But I think the working variable is changed from another thread so the notify signal may run in another thread context.

It would be better to wrap the GTK code in an Idle.add which would ensure it runs on the GTK thread.

danirabbit commented 1 week ago

@davidmhewitt wrapped in an Idle instead. Seems to work. Thanks for the tip!