chore: bump gpui-pre to 0.3.8 and clean up unused code
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
use std::rc::Rc;
|
||||
|
||||
use gpui::{App, ElementId, Entity, Window};
|
||||
use gpui::{App, ElementId, Window};
|
||||
|
||||
use crate::Root;
|
||||
use crate::dialog::Dialog;
|
||||
@@ -19,9 +17,6 @@ pub trait WindowExtension: Sized {
|
||||
/// Closes all active Dialogs.
|
||||
fn close_all_dialogs(&mut self, cx: &mut App);
|
||||
|
||||
/// Returns number of notifications.
|
||||
fn notifications(&mut self, cx: &mut App) -> Rc<Vec<Entity<Notification>>>;
|
||||
|
||||
/// Pushes a notification to the notification list.
|
||||
fn push_notification<T>(&mut self, note: T, cx: &mut App)
|
||||
where
|
||||
@@ -102,9 +97,4 @@ impl WindowExtension for Window {
|
||||
root.clear_notifications(window, cx);
|
||||
})
|
||||
}
|
||||
|
||||
fn notifications(&mut self, cx: &mut App) -> Rc<Vec<Entity<Notification>>> {
|
||||
let entity = Root::read(self, cx).notification.clone();
|
||||
Rc::new(entity.read(cx).notifications())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user