Skip to content

Commit bd5a9e6

Browse files
committed
fix(GalleryImageService): Upper the Delay so the fetching of FeedView Refresh Command is visualizable
1 parent bbeaf1a commit bd5a9e6

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/DevTKSS.Uno.Samples.MvuxGallery/Assets/Samples/GalleryImageService-noResw.cs.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public partial class GalleryImageService : IGalleryImageService
3131

3232
private async ValueTask<IImmutableList<GalleryImageModel>> GetDEGalleryImagesAsync(CancellationToken ct)
3333
{
34-
await Task.Delay(TimeSpan.FromMicroseconds(1),ct);
34+
// Simulate a delay to mimic an async operation (e.g., fetching from a database or API)
35+
await Task.Delay(TimeSpan.FromSeconds(2),ct);
3536
var galleryImages = new GalleryImageModel[]
3637
{
3738
new GalleryImageModel(
@@ -68,7 +69,8 @@ public partial class GalleryImageService : IGalleryImageService
6869

6970
private async ValueTask<IImmutableList<GalleryImageModel>> GetENGalleryImagesAsync(CancellationToken ct)
7071
{
71-
await Task.Delay(TimeSpan.FromMicroseconds(1), ct);
72+
// Simulate a delay to mimic an async operation (e.g., fetching from a database or API)
73+
await Task.Delay(TimeSpan.FromSeconds(2), ct);
7274
var galleryImages = new GalleryImageModel[]
7375
{
7476
new GalleryImageModel(

src/DevTKSS.Uno.Samples.MvuxGallery/Assets/Samples/GalleryImageService-resw.cs.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public partial class GalleryImageService : IGalleryImageService
3434

3535
private async ValueTask<IImmutableList<GalleryImageModel>> GetGalleryImagesAsync(CancellationToken ct)
3636
{
37-
await Task.Delay(TimeSpan.FromMicroseconds(1), ct);
37+
// Simulate a delay to mimic data fetching
38+
await Task.Delay(TimeSpan.FromSeconds(2), ct);
3839
var galleryImages = new GalleryImageModel[]
3940
{
4041
new GalleryImageModel(

src/DevTKSS.Uno.Samples.MvuxGallery/Models/GalleryImages/GalleryImageService.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public async ValueTask<IImmutableList<GalleryImageModel>> GetGalleryImagesWithou
3333
#region With resw
3434
private async ValueTask<IImmutableList<GalleryImageModel>> GetGalleryImagesAsync(CancellationToken ct)
3535
{
36-
await Task.Delay(TimeSpan.FromMicroseconds(1), ct);
36+
await Task.Delay(TimeSpan.FromSeconds(2), ct);
3737
var galleryImages = new GalleryImageModel[]
3838
{
3939
new GalleryImageModel(
@@ -70,7 +70,8 @@ private async ValueTask<IImmutableList<GalleryImageModel>> GetGalleryImagesAsync
7070
#region German gallery descriptions
7171
private async ValueTask<IImmutableList<GalleryImageModel>> GetDEGalleryImagesAsync(CancellationToken ct)
7272
{
73-
await Task.Delay(TimeSpan.FromMicroseconds(1),ct);
73+
// Simulate a delay to mimic data fetching
74+
await Task.Delay(TimeSpan.FromSeconds(2),ct);
7475
var galleryImages = new GalleryImageModel[]
7576
{
7677
new GalleryImageModel(
@@ -105,7 +106,8 @@ private async ValueTask<IImmutableList<GalleryImageModel>> GetDEGalleryImagesAsy
105106
#region English gallery descriptions
106107
private async ValueTask<IImmutableList<GalleryImageModel>> GetENGalleryImagesAsync(CancellationToken ct)
107108
{
108-
await Task.Delay(TimeSpan.FromMicroseconds(1), ct);
109+
// Simulate a delay to mimic data fetching
110+
await Task.Delay(TimeSpan.FromSeconds(2), ct);
109111
var galleryImages = new GalleryImageModel[]
110112
{
111113
new GalleryImageModel(

0 commit comments

Comments
 (0)