From cd445f758f08f97a719a3320d54df30620aa4434 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 28 Jan 2025 03:25:18 +0100 Subject: Display grid placeholder when loading `gallery` example --- examples/gallery/src/civitai.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/gallery/src/civitai.rs') diff --git a/examples/gallery/src/civitai.rs b/examples/gallery/src/civitai.rs index 7a8f1c45..986b6bf2 100644 --- a/examples/gallery/src/civitai.rs +++ b/examples/gallery/src/civitai.rs @@ -13,6 +13,8 @@ pub struct Image { } impl Image { + pub const LIMIT: usize = 99; + pub async fn list() -> Result, Error> { let client = reqwest::Client::new(); @@ -27,7 +29,7 @@ impl Image { ("sort", "Most Reactions"), ("period", "Week"), ("nsfw", "None"), - ("limit", "99"), + ("limit", &Image::LIMIT.to_string()), ]) .send() .await? -- cgit