This commit is contained in:
Antonio Scandurra 2023-10-23 14:59:57 +02:00
parent a72434f67b
commit 4e6fb9034d
7 changed files with 289 additions and 198 deletions

View file

@ -36,7 +36,8 @@ where
where
F: Fn(bool, &mut V, &mut ViewContext<V>) + Send + Sync + 'static,
{
self.observe_global::<FeatureFlags>(move |v, feature_flags, cx| {
self.observe_global::<FeatureFlags>(move |v, cx| {
let feature_flags = cx.global::<FeatureFlags>();
callback(feature_flags.has_flag(<T as FeatureFlag>::NAME), v, cx);
})
}