mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
fix: send buffer events
This commit is contained in:
parent
851781b041
commit
1f32834572
1 changed files with 6 additions and 3 deletions
|
@ -117,10 +117,13 @@ impl Workspace {
|
||||||
let action = rx.recv().await.unwrap();
|
let action = rx.recv().await.unwrap();
|
||||||
match action {
|
match action {
|
||||||
BufferAction::ADD { buffer } => {
|
BufferAction::ADD { buffer } => {
|
||||||
buffers.insert(buffer.view().name.clone(), buffer);
|
let view = buffer.view();
|
||||||
|
buffers.insert(view.name.clone(), buffer);
|
||||||
|
bus.send(Event::BufferNew { path: view.name }).unwrap();
|
||||||
}
|
}
|
||||||
BufferAction::REMOVE { path } => {
|
BufferAction::REMOVE { path } => {
|
||||||
buffers.remove(&path);
|
buffers.remove(&path);
|
||||||
|
bus.send(Event::BufferDelete { path: path }).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tx.send(
|
tx.send(
|
||||||
|
@ -177,7 +180,7 @@ impl Workspace {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum UserAction {
|
enum UserAction {
|
||||||
ADD {
|
ADD {
|
||||||
user: User,
|
user: User,
|
||||||
},
|
},
|
||||||
|
@ -191,7 +194,7 @@ pub enum UserAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum BufferAction {
|
enum BufferAction {
|
||||||
ADD {
|
ADD {
|
||||||
buffer: Buffer,
|
buffer: Buffer,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue