wip
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
use crate::rpc::Client;
|
||||
use gpui::{Entity, ModelHandle, WeakModelHandle};
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
pub struct ChannelList {
|
||||
channels: HashMap<u64, WeakModelHandle<Channel>>,
|
||||
rpc: Arc<Client>,
|
||||
}
|
||||
|
||||
pub struct Channel {
|
||||
id: u64,
|
||||
name: String,
|
||||
first_message_id: Option<u64>,
|
||||
messages: Option<VecDeque<ChannelMessage>>,
|
||||
rpc: Arc<Client>,
|
||||
}
|
||||
|
||||
pub struct ChannelMessage {
|
||||
id: u64,
|
||||
}
|
||||
|
||||
enum Event {}
|
||||
|
||||
impl Entity for ChannelList {
|
||||
type Event = Event;
|
||||
}
|
||||
|
||||
impl ChannelList {}
|
||||
@@ -1,4 +1,5 @@
|
||||
pub mod assets;
|
||||
pub mod channel;
|
||||
pub mod editor;
|
||||
pub mod file_finder;
|
||||
pub mod fs;
|
||||
|
||||
@@ -29,6 +29,7 @@ pub struct Client {
|
||||
pub struct ClientState {
|
||||
connection_id: Option<ConnectionId>,
|
||||
pub shared_worktrees: HashMap<u64, WeakModelHandle<Worktree>>,
|
||||
pub channel_list: Option<WeakModelHandle<ChannelList>>,
|
||||
pub languages: Arc<LanguageRegistry>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user