From 7b8bbd254a1deec917eb38382b7cbade0bd2b329 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 15:59:46 +0000 Subject: [PATCH] font-manager: count FontPicker stop builds through the runtime's service memory --- crates/font-manager/src/picker.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/font-manager/src/picker.rs b/crates/font-manager/src/picker.rs index 145c7b2fc..633637690 100644 --- a/crates/font-manager/src/picker.rs +++ b/crates/font-manager/src/picker.rs @@ -739,7 +739,7 @@ struct StopBuilds(u64); #[doc(hidden)] #[cfg(feature = "screen-testing")] pub fn stop_builds(ctx: &egui::Context) -> u64 { - ctx.data(|data| data.get_temp::(egui::Id::unique("font_picker_stop_builds")).unwrap_or_default().0) + craft_ui::runtime::egui::memory::with::(ctx, |builds| builds.0) } impl<'a> FontPicker<'a> { @@ -819,9 +819,7 @@ impl<'a> FontPicker<'a> { /// families in the list's narrowed order. A notice takes no step. fn stops(&self, cx: &Cx<'_, Self>, settings: Option<&FontPickerSettings>, filters: &FontFilters) -> Vec { #[cfg(feature = "screen-testing")] - cx.response.ctx.data_mut(|data| { - data.get_temp_mut_or_default::(egui::Id::unique("font_picker_stop_builds")).0 += 1; - }); + craft_ui::runtime::egui::memory::with::(&cx.response.ctx, |builds| builds.0 += 1); let folder = cx.env.folder(); let host = rank::host_rows(self.host, "", &folder) .into_iter()