parent
e3b593efbd
commit
c4083b9b63
28 changed files with 103 additions and 104 deletions
|
@ -82,7 +82,7 @@ impl ChannelBuffer {
|
|||
collaborators: Default::default(),
|
||||
acknowledge_task: None,
|
||||
channel_id: channel.id,
|
||||
subscription: Some(subscription.set_entity(&cx.entity(), &mut cx.to_async())),
|
||||
subscription: Some(subscription.set_entity(&cx.entity(), &cx.to_async())),
|
||||
user_store,
|
||||
channel_store,
|
||||
};
|
||||
|
@ -110,7 +110,7 @@ impl ChannelBuffer {
|
|||
let Ok(subscription) = self.client.subscribe_to_entity(self.channel_id.0) else {
|
||||
return;
|
||||
};
|
||||
self.subscription = Some(subscription.set_entity(&cx.entity(), &mut cx.to_async()));
|
||||
self.subscription = Some(subscription.set_entity(&cx.entity(), &cx.to_async()));
|
||||
cx.emit(ChannelBufferEvent::Connected);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -532,7 +532,7 @@ impl ChannelChat {
|
|||
message: TypedEnvelope<proto::ChannelMessageSent>,
|
||||
mut cx: AsyncApp,
|
||||
) -> Result<()> {
|
||||
let user_store = this.read_with(&mut cx, |this, _| this.user_store.clone())?;
|
||||
let user_store = this.read_with(&cx, |this, _| this.user_store.clone())?;
|
||||
let message = message.payload.message.context("empty message")?;
|
||||
let message_id = message.id;
|
||||
|
||||
|
@ -564,7 +564,7 @@ impl ChannelChat {
|
|||
message: TypedEnvelope<proto::ChannelMessageUpdate>,
|
||||
mut cx: AsyncApp,
|
||||
) -> Result<()> {
|
||||
let user_store = this.read_with(&mut cx, |this, _| this.user_store.clone())?;
|
||||
let user_store = this.read_with(&cx, |this, _| this.user_store.clone())?;
|
||||
let message = message.payload.message.context("empty message")?;
|
||||
|
||||
let message = ChannelMessage::from_proto(message, &user_store, &mut cx).await?;
|
||||
|
|
|
@ -908,9 +908,9 @@ impl ChannelStore {
|
|||
async fn handle_update_channels(
|
||||
this: Entity<Self>,
|
||||
message: TypedEnvelope<proto::UpdateChannels>,
|
||||
mut cx: AsyncApp,
|
||||
cx: AsyncApp,
|
||||
) -> Result<()> {
|
||||
this.read_with(&mut cx, |this, _| {
|
||||
this.read_with(&cx, |this, _| {
|
||||
this.update_channels_tx
|
||||
.unbounded_send(message.payload)
|
||||
.unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue