Add autoupdate2

co-authoredby: max@zed.dev
This commit is contained in:
Mikayla 2023-11-17 15:48:32 -08:00
parent a03d062120
commit dd283b471a
No known key found for this signature in database
10 changed files with 540 additions and 5 deletions

View file

@ -15,6 +15,8 @@ pub enum NotificationEvent {
pub trait Notification: EventEmitter<NotificationEvent> + Render {}
impl<V: EventEmitter<NotificationEvent> + Render> Notification for V {}
pub trait NotificationHandle: Send {
fn id(&self) -> EntityId;
fn to_any(&self) -> AnyView;
@ -164,7 +166,7 @@ impl Workspace {
}
pub mod simple_message_notification {
use super::{Notification, NotificationEvent};
use super::NotificationEvent;
use gpui::{AnyElement, AppContext, Div, EventEmitter, Render, TextStyle, ViewContext};
use serde::Deserialize;
use std::{borrow::Cow, sync::Arc};
@ -359,7 +361,6 @@ pub mod simple_message_notification {
// }
impl EventEmitter<NotificationEvent> for MessageNotification {}
impl Notification for MessageNotification {}
}
pub trait NotifyResultExt {