Skip to content

Commit

Permalink
Forgot to remove limit in API call
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkenJaden committed Mar 22, 2024
1 parent 3bf0c81 commit eeeb428
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Nekos/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,7 @@
PreloadImageUrl2 = PreloadImageUrl1!.Next;
StateHasChanged();
await _console.LogAsync($"Current image ID: {Image.Value.Id}");
if (Image != null && _images.Count - _images.FindIndex(x => x.Equals(Image.Value)) < 20)
{
await LoadImages();
}
if (Image != null && _images.Count - _images.FindIndex(x => x.Equals(Image.Value)) < 20) await LoadImages();
}
}

Expand All @@ -194,9 +191,9 @@
private async Task LoadImages()
{
await _console.LogAsync("Loading new images in queue...");
var images = await _nekoClient.ImagesAsync(rating: ["explicit"], tag: [8], limit: 25, is_screenshot:false);
var images = await _nekoClient.ImagesAsync(rating: ["explicit"], tag: [8], is_screenshot:false);
foreach (var image in images.Items) if (!_images.Any(x => x.Id.Equals(image.Id))) _images.AddLast(image);
await _console.LogAsync("Image loading finished.");
await _console.LogAsync($"Image loading finished. Total images in list: {_images.Count}");
}

/// <summary>
Expand Down

0 comments on commit eeeb428

Please sign in to comment.