wip: refactor
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
use super::{
|
||||
account::Account, chat::ChatPanel, onboarding::Onboarding, sidebar::Sidebar,
|
||||
welcome::WelcomePanel,
|
||||
};
|
||||
use crate::states::{app::AppRegistry, chat::Room};
|
||||
use super::{account::Account, onboarding::Onboarding, sidebar::Sidebar, welcome::WelcomePanel};
|
||||
use crate::states::app::AppRegistry;
|
||||
use gpui::{
|
||||
div, impl_actions, px, Axis, Context, Edges, InteractiveElement, IntoElement, Model,
|
||||
ParentElement, Render, Styled, View, ViewContext, VisualContext, WeakView, WindowContext,
|
||||
@@ -18,7 +15,7 @@ use ui::{
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Deserialize)]
|
||||
pub enum PanelKind {
|
||||
Room(Arc<Room>),
|
||||
Room(u64),
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Deserialize)]
|
||||
@@ -132,15 +129,17 @@ impl AppView {
|
||||
}
|
||||
|
||||
fn on_action_add_panel(&mut self, action: &AddPanel, cx: &mut ViewContext<Self>) {
|
||||
/*
|
||||
match &action.panel {
|
||||
PanelKind::Room(room) => {
|
||||
let panel = Arc::new(ChatPanel::new(room, cx));
|
||||
PanelKind::Room(id) => {
|
||||
let panel = Arc::new(ChatPanel::new(id, cx));
|
||||
|
||||
self.dock.update(cx, |dock_area, cx| {
|
||||
dock_area.add_panel(panel, action.position, cx);
|
||||
});
|
||||
}
|
||||
};
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user