uno.toolkit.ui icon indicating copy to clipboard operation
uno.toolkit.ui copied to clipboard

[LoadingView] Use of Dispatcher on WinUI

Open dr1rrb opened this issue 2 years ago • 4 comments

Current behavior

https://github.com/unoplatform/uno.toolkit.ui/blob/main/src/Uno.Toolkit.UI/Controls/LoadingView/CompositeLoadableSource.cs#L124

We use the Dispatcher property on WinUI which is not on Windows WinUI project.

Expected behavior

We have to use the DispatcherQueue which is available on all platfroms.

How to reproduce it (as minimally and precisely as possible)

Use the LoadingView on Windows with a WinUI project

Environment

Affected platform(s):

  • [ ] iOS
  • [ ] Android
  • [ ] WebAssembly
  • [ ] WebAssembly renders for Xamarin.Forms
  • [x] Windows
  • [ ] Build tasks

Visual Studio:

  • [ ] 2017 (version: )
  • [ ] 2019 (version: )
  • [ ] for Mac (version: )

Relevant plugins:

  • [ ] Resharper (version: )

Anything else we need to know?

dr1rrb avatar Oct 05 '22 20:10 dr1rrb

@Xiaoy312 @nickrandolph Not sure who is working on it right now :)

dr1rrb avatar Oct 05 '22 20:10 dr1rrb

I can take a look once I get toolkit building again - bad merge

nickrandolph avatar Oct 06 '22 01:10 nickrandolph

i have this fixed in my branch, not sure when it will be up/merged: https://github.com/unoplatform/uno.toolkit.ui/commit/32fadceabd433530b424cf9e386e1f2bd91650eb likely wont be in the same pr. it is kinda out of scope with runtime tests? btw CI is in a bad state today, so i cant just make a quick pr for that now :/

@nickrandolph you can just grab the code too

Xiaoy312 avatar Oct 06 '22 03:10 Xiaoy312

Thanks. Will need to modify it slightly as we can't call getforcurrentthread from background thread as it returns null

nickrandolph avatar Oct 06 '22 03:10 nickrandolph