Skip to content

Commit

Permalink
Better loading message
Browse files Browse the repository at this point in the history
  • Loading branch information
Webreaper committed Dec 30, 2024
1 parent 1289926 commit 94d041f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Damselfly.Web.Client/Components/ImageBrowser/ImageGrid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
// If we've tried to load data and there isn't any more, show the toast.
toastClass = endOfImages ? "show" : string.Empty;

_ = AddImagesToGrid(response.MoreDataAvailable);
_ = AddImagesToGrid(response);
}

protected void SearchQueryChanged()
Expand All @@ -261,13 +261,13 @@
await searchService.LoadMore();
}

private async Task AddImagesToGrid(bool moreDataAvaiable)
private async Task AddImagesToGrid(SearchResponse response)
{
NoResultsFound = true;

if ( searchService.SearchResults.Any() )
{
ResultsMessage = $"Loading {searchService.SearchResults.Count()} images...";
ResultsMessage = $"Found {response.SearchResults.Count()} images...";
NoResultsFound = false;

foreach( var set in searchService.SearchResults.Chunk(25) )
Expand All @@ -287,7 +287,7 @@
}

// Flag the 'more' div if we loaded at least as many as we requested.
endOfImages = !moreDataAvaiable;
endOfImages = !response.MoreDataAvailable;
StateHasChanged();
}

Expand Down
2 changes: 1 addition & 1 deletion Damselfly.Web.Client/wwwroot/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const CACHE_VERSION='4.2.1-20241230143627'
const CACHE_VERSION='4.2.1-20241230151834'

0 comments on commit 94d041f

Please sign in to comment.