add event map
This commit is contained in:
@@ -13,4 +13,5 @@ pub enum Command {
|
||||
Copy(PublicKey),
|
||||
Relays(PublicKey),
|
||||
Njump(PublicKey),
|
||||
Trace(EventId),
|
||||
}
|
||||
|
||||
@@ -658,9 +658,19 @@ impl ChatPanel {
|
||||
Command::Njump(public_key) => {
|
||||
self.open_njump(public_key, cx);
|
||||
}
|
||||
Command::Trace(id) => {
|
||||
self.open_trace(id, window, cx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn open_trace(&mut self, id: &EventId, window: &mut Window, cx: &mut Context<Self>) {
|
||||
window.open_modal(cx, move |this, _window, cx| {
|
||||
// TODO
|
||||
this.child(v_flex().child(""))
|
||||
});
|
||||
}
|
||||
|
||||
fn open_relays(&mut self, public_key: &PublicKey, window: &mut Window, cx: &mut Context<Self>) {
|
||||
let profile = self.profile(public_key, cx);
|
||||
|
||||
@@ -1131,15 +1141,10 @@ impl ChatPanel {
|
||||
.ghost()
|
||||
.dropdown_menu({
|
||||
let public_key = *public_key;
|
||||
let _id = *id;
|
||||
let id = *id;
|
||||
move |this, _window, _cx| {
|
||||
this.menu("Copy author", Box::new(Command::Copy(public_key)))
|
||||
/*
|
||||
.menu(
|
||||
"Trace",
|
||||
Box::new(Command::Trace(id)),
|
||||
)
|
||||
*/
|
||||
.menu("Seen on", Box::new(Command::Trace(id)))
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user