Skip to content

Commit

Permalink
add Dispatcher in filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane ANDRE (E104915) committed Sep 5, 2024
1 parent 3417598 commit dc6d55f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MyNet.Wpf/Controls/CalendarItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ public CalendarItem(CalendarBase owner, DateTime date, TimeUnit unit, Observable

_disposable = appointments.ToObservableChangeSet()
.Transform(x => (IAppointment)x.DataContext)
.ObserveOn(Scheduler.UI)
.AutoRefresh(x => x.StartDate)
.AutoRefresh(x => Date)
.Filter(x => Owner.AppointmentsDisplayMode == AppointmentsDisplayMode.Cell && IsMatch(x))
.Filter(x => Dispatcher.Invoke(() => Owner.AppointmentsDisplayMode == AppointmentsDisplayMode.Cell) && IsMatch(x))
.Sort(SortExpressionComparer<IAppointment>.Ascending(x => x.StartDate))
.ObserveOn(Scheduler.UI)
.Bind(out _appointments)
.Subscribe();
SetValue(AppointmentsPropertyKey, _appointments);
Expand Down

0 comments on commit dc6d55f

Please sign in to comment.