add DirtyAll to SchedulerMsg

This commit is contained in:
Evan Almloff committed 2022-06-09 10:01:09 -05:00
1 parent d4dda577d6
commit fe5c698c09
2 files changed
+10 -4

No files matched your search

+8
View File
@@ -125,6 +125,9 @@ pub enum SchedulerMsg {
/// Immediate updates from Components that mark them as dirty
Immediate(ScopeId),
/// Mark all components as dirty and update them
DirtyAll,
/// New tasks from components that should be polled when the next poll is ready
NewTask(ScopeId),
}
@@ -407,6 +410,11 @@ impl VirtualDom {
SchedulerMsg::Immediate(s) => {
self.dirty_scopes.insert(s);
}
SchedulerMsg::DirtyAll => {
for id in self.scopes.scopes.borrow().keys() {
self.dirty_scopes.insert(*id);
}
}
}
}