Open link popup via key binding
This commit is contained in:
parent
bb542ae08e
commit
c09608d1f8
6 changed files with 123 additions and 4 deletions
|
|
@ -337,6 +337,13 @@ impl<M: Msg, S: MsgStore<M>> InnerTreeViewState<M, S> {
|
|||
}
|
||||
}
|
||||
|
||||
fn cursor(&self) -> Option<M::Id> {
|
||||
match &self.cursor {
|
||||
Cursor::Msg(id) => Some(id.clone()),
|
||||
Cursor::Bottom | Cursor::Editor { .. } | Cursor::Pseudo { .. } => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn sent(&mut self, id: Option<M::Id>) {
|
||||
if let Cursor::Pseudo { coming_from, .. } = &self.cursor {
|
||||
if let Some(id) = id {
|
||||
|
|
@ -385,6 +392,10 @@ impl<M: Msg, S: MsgStore<M>> TreeViewState<M, S> {
|
|||
.await
|
||||
}
|
||||
|
||||
pub async fn cursor(&self) -> Option<M::Id> {
|
||||
self.0.lock().await.cursor()
|
||||
}
|
||||
|
||||
pub async fn sent(&mut self, id: Option<M::Id>) {
|
||||
self.0.lock().await.sent(id)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue