You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we stay inin the “Photos with objects” filtering mode, and then start processing the next batch of photos, then upon completion this list is not updated, you need to manually enable the display of all photos and then return to the filter.
In short, the filter is not automatically applied when updating the original image collection. In order for the filter to be updated, you need to call it explicitly.
The text was updated successfully, but these errors were encountered:
gserrg
changed the title
Сброс выбранной фотографии в списке изображений
Нужно проработать режим открытия новой папки с изображениями
Mar 23, 2020
gosha20777
changed the title
Нужно проработать режим открытия новой папки с изображениями
The filter is not applied when changing the original collection
Mar 24, 2020
This is because ReactiveUI Dynamic.Data is able to handle filter changes only when the target property that sets the filter changes. But the filter does not track collection changes.
Look at example here:
SourceList<PhotoViewModel>_photos{get;set;}=newSourceList<PhotoViewModel>();privateReadOnlyObservableCollection<PhotoViewModel>_photoCollection;
...
public MainWindowViewModel(Windowwindow){
...var typeFilter =this.WhenValueChanged(x =>x.FilterType).Select(TypeFilter);_photos.Connect().Filter(typeFilter).ObserveOn(RxApp.MainThreadScheduler).Bind(out_photoCollection).DisposeMany().Subscribe();
...}
...private Func<PhotoViewModel,bool> TypeFilter(intfitlerType){switch(fitlerType){caseAny:return x =>true;caseWithObject:return x =>x.Photo.Attribute==Attribute.WithObject;caseFavorite:return x =>x.Photo.Attribute==Attribute.Favorite;default:thrownewException("invalid filter");}}
So i really do not know how to make it update filter when the _photos source list changed. @worldbeater may be you knows?
@gserrg I am find a temporary solution -) I simply can add button with 🔄 same sign "update" in the left of filter. and you can click in it to update the collection)
If we stay inin the “Photos with objects” filtering mode, and then start processing the next batch of photos, then upon completion this list is not updated, you need to manually enable the display of all photos and then return to the filter.
In short, the filter is not automatically applied when updating the original image collection. In order for the filter to be updated, you need to call it explicitly.
The text was updated successfully, but these errors were encountered: