diff --git a/build/ci/.azure-pipelines.Packages.yml b/build/ci/.azure-pipelines.Packages.yml index 2af46d895b..672e5ffbd1 100644 --- a/build/ci/.azure-pipelines.Packages.yml +++ b/build/ci/.azure-pipelines.Packages.yml @@ -44,7 +44,7 @@ jobs: msbuildLocationMethod: location msbuildLocation: $(MSBUILDPATH) msbuildArchitecture: x86 - msbuildArguments: /r /m /v:m /p:Configuration=Release "/p:PackageOutputPath=$(build.artifactstagingdirectory)\nuget" "/p:PackageVersion=%GITVERSION_FullSemVer%" "/p:InformationalVersion=%GITVERSION_InformationalVersion%" /detailedsummary /bl:$(build.artifactstagingdirectory)/uno-extensions.binlog + msbuildArguments: /r /m /v:m /p:Configuration=Release "/p:PackageOutputPath=$(build.artifactstagingdirectory)\nuget" "/p:PackageVersion=$(GitVersion.FullSemVer)" "/p:InformationalVersion=%GITVERSION_InformationalVersion%" /detailedsummary /bl:$(build.artifactstagingdirectory)/uno-extensions.binlog clean: false maximumCpuCount: true restoreNugetPackages: false diff --git a/src/Uno.Extensions.Reactive.UI/Presentation/Bindings/Collections/Facets/PaginationFacet.cs b/src/Uno.Extensions.Reactive.UI/Presentation/Bindings/Collections/Facets/PaginationFacet.cs index d62082788d..82e8ed9b83 100644 --- a/src/Uno.Extensions.Reactive.UI/Presentation/Bindings/Collections/Facets/PaginationFacet.cs +++ b/src/Uno.Extensions.Reactive.UI/Presentation/Bindings/Collections/Facets/PaginationFacet.cs @@ -16,12 +16,14 @@ internal class PaginationFacet : IDisposable private readonly CancellationTokenSource _ct = new(); private readonly IPaginationService? _service; + private readonly IBindableCollectionViewSource _source; private readonly CollectionChangedFacet _changed; private readonly BindableCollectionExtendedProperties _properties; public PaginationFacet(IBindableCollectionViewSource source, CollectionChangedFacet changed, BindableCollectionExtendedProperties properties) { _service = source.GetService(typeof(IPaginationService)) as IPaginationService; + _source = source; _changed = changed; _properties = properties; @@ -59,7 +61,7 @@ private void OnServiceStateChanged(object? sender, EventArgs _) { _properties.HasMoreItems = HasMoreItems = svc.HasMoreItems; _properties.IsLoadingMoreItems = svc.IsLoadingMoreItems; - _changed.PropertyChanged(nameof(HasMoreItems)); + _source.Dispatcher?.TryEnqueue(() => _changed.PropertyChanged(nameof(HasMoreItems))); } else { diff --git a/src/Uno.Extensions.Reactive.UI/View/FeedView.xaml b/src/Uno.Extensions.Reactive.UI/View/FeedView.xaml index 2b860fd542..3436cbe16d 100644 --- a/src/Uno.Extensions.Reactive.UI/View/FeedView.xaml +++ b/src/Uno.Extensions.Reactive.UI/View/FeedView.xaml @@ -74,7 +74,7 @@ - + - + + + + + @@ -113,8 +118,8 @@ - - + + diff --git a/src/Uno.Extensions.Reactive/Sources/PaginatedListFeed.cs b/src/Uno.Extensions.Reactive/Sources/PaginatedListFeed.cs index 877f9bdb0f..4d9c2ab24e 100644 --- a/src/Uno.Extensions.Reactive/Sources/PaginatedListFeed.cs +++ b/src/Uno.Extensions.Reactive/Sources/PaginatedListFeed.cs @@ -40,6 +40,8 @@ public IAsyncEnumerable>> GetSource(SourceContext async ValueTask Load(TokenSet? refresh, CancellationToken ct) { + refreshRequests.MoveNext(); + var cursor = _firstPage; var pageInfo = new PaginationInfo { HasMoreItems = true }; var isFirstPage = true; @@ -71,7 +73,6 @@ async ValueTask Load(TokenSet? refresh, CancellationToken ct) // Prepare the next token we will process pageRequests.MoveNext(); - refreshRequests.MoveNext(); isFirstPage = false; } }