Make App::notify_view private

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-04-21 16:50:57 +02:00
parent 8c7f821d14
commit a860a6cd62
2 changed files with 9 additions and 8 deletions

View file

@ -1112,21 +1112,21 @@ impl AppContext {
})
}
pub(crate) fn notify_model(&mut self, model_id: usize) {
fn notify_model(&mut self, model_id: usize) {
if self.pending_notifications.insert(model_id) {
self.pending_effects
.push_back(Effect::ModelNotification { model_id });
}
}
pub(crate) fn notify_view(&mut self, window_id: usize, view_id: usize) {
fn notify_view(&mut self, window_id: usize, view_id: usize) {
if self.pending_notifications.insert(view_id) {
self.pending_effects
.push_back(Effect::ViewNotification { window_id, view_id });
}
}
pub(crate) fn notify_global(&mut self, type_id: TypeId) {
fn notify_global(&mut self, type_id: TypeId) {
if self.pending_global_notifications.insert(type_id) {
self.pending_effects
.push_back(Effect::GlobalNotification { type_id });