From da5b8cb5b41b22bcf87094f55d5b6bd8aed6c708 Mon Sep 17 00:00:00 2001 From: jariji <96840304+jariji@users.noreply.github.com> Date: Tue, 28 Oct 2025 22:51:55 -0700 Subject: [PATCH] Show text on occlusion cards regardless of occludeInactive (#4387) * Show text on occlusion cards regardless of `occludeInactive`. Before this change, on an image occlusion card, a text box was visible during editing but not visible during review. This change makes text visible even if other shapes would be hidden. * Move fix to render_image_occlusion() --------- Co-authored-by: jariji Co-authored-by: Abdo --- CONTRIBUTORS | 3 ++- rslib/src/cloze.rs | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 01573b419..d90b7dbcc 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -189,7 +189,7 @@ Christian Donat Asuka Minato Dillon Baldwin Voczi -Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com> +Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com> Themis Demetriades Luke Bartholomew Gregory Abrasaldo @@ -253,6 +253,7 @@ arold0 nav1s Ranjit Odedra Eltaurus +jariji ******************** diff --git a/rslib/src/cloze.rs b/rslib/src/cloze.rs index 9df53286d..70a5d1703 100644 --- a/rslib/src/cloze.rs +++ b/rslib/src/cloze.rs @@ -260,7 +260,6 @@ fn reveal_cloze( image_occlusion_text, question, active, - cloze_ord, &cloze.ordinals, )); return; @@ -332,10 +331,9 @@ fn render_image_occlusion( text: &str, question_side: bool, active: bool, - ordinal: u16, ordinals: &[u16], ) -> String { - if (question_side && active) || ordinal == 0 { + if (question_side && active) || ordinals.contains(&0) { format!( r#"
"#, ordinals_str(ordinals),