use client::{ channel::{Channel, ChannelEvent, ChannelList, ChannelMessage}, Client, }; use editor::Editor; use gpui::{ actions, elements::*, platform::CursorStyle, views::{ItemType, Select, SelectStyle}, AppContext, Entity, ModelHandle, MutableAppContext, RenderContext, Subscription, Task, View, ViewContext, ViewHandle, }; use postage::prelude::Stream; use settings::{Settings, SoftWrap}; use std::sync::Arc; use time::{OffsetDateTime, UtcOffset}; use util::{ResultExt, TryFutureExt}; use workspace::menu::Confirm; const MESSAGE_LOADING_THRESHOLD: usize = 50; pub struct ChatPanel { rpc: Arc, channel_list: ModelHandle, active_channel: Option<(ModelHandle, Subscription)>, message_list: ListState, input_editor: ViewHandle, channel_select: ViewHandle