From 2b1689bbe0824a94f6aad97e7beb6c0757813eeb Mon Sep 17 00:00:00 2001 From: iliana etaoin Date: Thu, 6 Apr 2023 13:06:26 -0700 Subject: [PATCH] default to visible if visible_in_picker missing (... again) --- src/app.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.rs b/src/app.rs index aa54d78..c13e6cf 100644 --- a/src/app.rs +++ b/src/app.rs @@ -76,7 +76,7 @@ async fn instance( shortcode: String, url: String, static_url: String, - visible_in_picker: bool, + visible_in_picker: Option, } #[derive(Template)] @@ -120,7 +120,7 @@ async fn instance( let mut emojo: Vec = response.json().await?; if !show_all { - emojo.retain(|x| x.visible_in_picker); + emojo.retain(|x| x.visible_in_picker.unwrap_or(true)); } anyhow::Ok(