diff options
author | 2025-01-28 03:25:18 +0100 | |
---|---|---|
committer | 2025-01-28 03:25:18 +0100 | |
commit | cd445f758f08f97a719a3320d54df30620aa4434 (patch) | |
tree | 2c63fffc6a06148c8ed65753debc0a1f6a17f52e /examples/gallery/src/civitai.rs | |
parent | ae35992048e7717a6e4308841859bfb6c0a7d51c (diff) | |
download | iced-cd445f758f08f97a719a3320d54df30620aa4434.tar.gz iced-cd445f758f08f97a719a3320d54df30620aa4434.tar.bz2 iced-cd445f758f08f97a719a3320d54df30620aa4434.zip |
Display grid placeholder when loading `gallery` example
Diffstat (limited to 'examples/gallery/src/civitai.rs')
-rw-r--r-- | examples/gallery/src/civitai.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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<Vec<Self>, 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? |