Skip to content

Commit

Permalink
fix: localselection for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rajamatt committed Jul 24, 2024
1 parent 066df73 commit 724d6e1
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,19 @@ internal class SelectionFacet : IDisposable, ISelectionInfo

private bool _isInit;

public SelectionFacet(IBindableCollectionViewSource source, CollectionChangedFacet collectionChangedFacet, Func < IObservableVector<object>> target)
public SelectionFacet(IBindableCollectionViewSource source, CollectionChangedFacet collectionChangedFacet, Func <IObservableVector<object>> target)
{
_service = source.GetService(typeof(ISelectionService)) as ISelectionService;
_target = new Lazy<IObservableVector<object>>(target, LazyThreadSafetyMode.None);
_dispatcher = source.Dispatcher;
_collectionChangedFacet = collectionChangedFacet;

#if __WINDOWS__
if (_service is not null)
{
UpdateLocalSelection(_service.GetSelectedRanges());
}
#endif
}

private void Init()
Expand Down

0 comments on commit 724d6e1

Please sign in to comment.