Panics · P42 Misc: handlers in new; the web view shows wry's failures; kept state fits lists that changed

This commit is contained in:
ZacharyZhang-NY committed 2026-10-07 07:17:20 -04:00
1 parent 770d13575d
commit 3a0a4bb699
20 files changed
+362 -189

No files matched your search

+7
View File
@@ -132,6 +132,13 @@ impl RenderOnce for Quiz {
assert!(count > 0, "quiz {id:?} has no questions");
let sitting =
window.use_keyed_state((id.clone(), "sitting"), cx, |_, _| Sitting::default());
if sitting.read(cx).at >= count {
log::error!(
"quiz {id:?}: question {} of {count}; it starts over",
sitting.read(cx).at
);
sitting.update(cx, |sitting, _| *sitting = Sitting::default());
}
let action = tab_stop((id.clone(), "action").into(), true, window, cx);
let theme = cx.theme();
let colors = &theme.colors;