Rename subscribe
to add_{message,request}_handler
in Client
This makes it easier to distinguish between messages and requests.
This commit is contained in:
parent
6a6cd68df4
commit
1aff42302c
4 changed files with 52 additions and 39 deletions
|
@ -58,7 +58,7 @@ impl UserStore {
|
|||
let (mut current_user_tx, current_user_rx) = watch::channel();
|
||||
let (mut update_contacts_tx, mut update_contacts_rx) =
|
||||
watch::channel::<Option<proto::UpdateContacts>>();
|
||||
let update_contacts_subscription = client.subscribe(
|
||||
let update_contacts_subscription = client.add_message_handler(
|
||||
cx,
|
||||
move |_: ModelHandle<Self>, msg: TypedEnvelope<proto::UpdateContacts>, _, _| {
|
||||
*update_contacts_tx.borrow_mut() = Some(msg.payload);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue