History

Exclude disconnected channel views from following messages

Max Brunsfeld committed 3 years ago

Commit 2e5461e1 parent a50977e1 file · +6 −2Browse files

Unified · Split

crates/collab_ui/src/channel_view.rs+6−2
@@ -285,10 +285,14 @@ impl FollowableItem for ChannelView { · 284 unmodified lines
285 }285 }
286 286
287 fn to_state_proto(&self, cx: &AppContext) -> Option<proto::view::Variant> {287 fn to_state_proto(&self, cx: &AppContext) -> Option<proto::view::Variant> {
288 let channel = self.channel_buffer.read(cx).channel();288 let channel_buffer = self.channel_buffer.read(cx);
289 if !channel_buffer.is_connected() {
290 return None;
291 }
292
289 Some(proto::view::Variant::ChannelView(293 Some(proto::view::Variant::ChannelView(
290 proto::view::ChannelView {294 proto::view::ChannelView {
291 channel_id: channel.id,295 channel_id: channel_buffer.channel().id,
292 editor: if let Some(proto::view::Variant::Editor(proto)) =296 editor: if let Some(proto::view::Variant::Editor(proto)) =
293 self.editor.read(cx).to_state_proto(cx)297 self.editor.read(cx).to_state_proto(cx)
294 {298 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t