default to visible if visible_in_picker missing
(... again)
This commit is contained in:
parent
bcd65caba7
commit
2b1689bbe0
|
@ -76,7 +76,7 @@ async fn instance(
|
||||||
shortcode: String,
|
shortcode: String,
|
||||||
url: String,
|
url: String,
|
||||||
static_url: String,
|
static_url: String,
|
||||||
visible_in_picker: bool,
|
visible_in_picker: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
|
@ -120,7 +120,7 @@ async fn instance(
|
||||||
|
|
||||||
let mut emojo: Vec<Emojo> = response.json().await?;
|
let mut emojo: Vec<Emojo> = response.json().await?;
|
||||||
if !show_all {
|
if !show_all {
|
||||||
emojo.retain(|x| x.visible_in_picker);
|
emojo.retain(|x| x.visible_in_picker.unwrap_or(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
anyhow::Ok(
|
anyhow::Ok(
|
||||||
|
|
Loading…
Reference in New Issue