Make new ChatMsg trait for Chat message rendering
This commit is contained in:
parent
5c9c6e9d98
commit
4ac0b5f074
13 changed files with 122 additions and 69 deletions
|
|
@ -4,11 +4,12 @@ use crate::store::{Msg, MsgStore, Path, Tree};
|
|||
use crate::ui::chat::blocks::Block;
|
||||
use crate::ui::widgets::empty::Empty;
|
||||
use crate::ui::widgets::text::Text;
|
||||
use crate::ui::ChatMsg;
|
||||
|
||||
use super::tree_blocks::{BlockId, Root, TreeBlocks};
|
||||
use super::{widgets, Cursor, InnerTreeViewState};
|
||||
|
||||
impl<M: Msg, S: MsgStore<M>> InnerTreeViewState<M, S> {
|
||||
impl<M: Msg + ChatMsg, S: MsgStore<M>> InnerTreeViewState<M, S> {
|
||||
async fn cursor_path(&self, cursor: &Cursor<M::Id>) -> Path<M::Id> {
|
||||
match cursor {
|
||||
Cursor::Msg(id) => self.store.path(id).await,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue