Arlodotexe / strix-music

Combine any music sources into a single library. It's your music. Play it your way.
http://www.strixmusic.com
139 stars 4 forks source link

Remove OwlCore.Threading dependency in ViewModels #85

Closed Arlodotexe closed 2 years ago

Arlodotexe commented 2 years ago

Closes AB#885

When we originally implemented the ViewModels, we found that adding items to an ObservableCollection could not be done by calling SynchronizationContext.SetSynchronizationContext(). To fix this, we created the Threading extensions in OwlCore that allows us to invoke on the UI thread.

We discovered that this could instead by done via SynchronizationContext.Post(), meaning we no longer need to depend on the Threading extension in OwlCore.

This PR remove any usage of OwlCore.Threading in favor of SynchronizationContext in all ViewModels.

Arlodotexe commented 2 years ago

Looks like regex has been used to make changes. Thanks for testing the app after this.

Good eye :) Regex was used for all the single-line replacements, everything else was done manually.