Unified · Split
| @@ -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 | { |