T42d Misc · Asking and learning passes review

The poll's mark and its row's selector share one binding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-09-28 03:24:15 -04:00
1 parent 8f85e4fe04
commit 4d21b15219
2 files changed
+6 -3

No files matched your search

+3 -2
View File
@@ -127,8 +127,9 @@ impl RenderOnce for Poll {
_ => *votes as f32 / total as f32,
};
let percent = format::percent(share as f64, 0, false);
let marked = ix == voted;
div()
.debug_selector(|| match ix == voted {
.debug_selector(|| match marked {
true => format!("poll-{label}-{percent}-voted"),
false => format!("poll-{label}-{percent}"),
})
@@ -147,7 +148,7 @@ impl RenderOnce for Poll {
.text_color(colors.fg)
.child(Ellipsis::new(label.clone())),
)
.when(ix == voted, |row| {
.when(marked, |row| {
row.child(
Icon::new(IconName::CircleCheck)
.size(IconSize::Sm)