From 20b699d6306d7ac0f8fb243f4bd26c1fba087cc0 Mon Sep 17 00:00:00 2001 From: NICK BRAIN Date: Sun, 1 Dec 2024 19:35:51 +0200 Subject: [PATCH] + animation delay --- My1kWordsEe/Components/Pages/FavoritesPage.razor | 2 ++ My1kWordsEe/Components/Pages/WordPage.razor | 2 ++ 2 files changed, 4 insertions(+) diff --git a/My1kWordsEe/Components/Pages/FavoritesPage.razor b/My1kWordsEe/Components/Pages/FavoritesPage.razor index cf325e4..f4c2035 100644 --- a/My1kWordsEe/Components/Pages/FavoritesPage.razor +++ b/My1kWordsEe/Components/Pages/FavoritesPage.razor @@ -42,6 +42,7 @@ PreloadService.Show(SpinnerColor.Light, "Saving data..."); var user = await UserAccessor.GetRequiredUserAsync(User); Favorites = await AddToFavoritesCommand.Invoke(user.Id, favorite); + await Task.Delay(300); PreloadService.Hide(); StateHasChanged(); } @@ -51,6 +52,7 @@ PreloadService.Show(SpinnerColor.Light, "Saving data..."); var user = await UserAccessor.GetRequiredUserAsync(User); Favorites = await RemoveFromFavoritesCommand.Invoke(user.Id, favorite); + await Task.Delay(300); PreloadService.Hide(); StateHasChanged(); } diff --git a/My1kWordsEe/Components/Pages/WordPage.razor b/My1kWordsEe/Components/Pages/WordPage.razor index 76dec2c..a5026e3 100644 --- a/My1kWordsEe/Components/Pages/WordPage.razor +++ b/My1kWordsEe/Components/Pages/WordPage.razor @@ -75,6 +75,7 @@ PreloadService.Show(SpinnerColor.Light, "Saving data..."); var user = await UserAccessor.GetRequiredUserAsync(User); Favorites = await AddToFavoritesCommand.Invoke(user.Id, favorite); + await Task.Delay(300); PreloadService.Hide(); StateHasChanged(); } @@ -85,6 +86,7 @@ var user = await UserAccessor.GetRequiredUserAsync(User); Favorites = await RemoveFromFavoritesCommand.Invoke(user.Id, favorite); PreloadService.Hide(); + await Task.Delay(300); StateHasChanged(); }