Use read()
over read_with()
to improve readability in simple cases (#31263)
Release Notes: - N/A
This commit is contained in:
parent
e88cad29e5
commit
6206150e27
5 changed files with 11 additions and 18 deletions
|
@ -109,9 +109,7 @@ impl ProjectSharedNotification {
|
|||
}
|
||||
|
||||
fn dismiss(&mut self, cx: &mut Context<Self>) {
|
||||
if let Some(active_room) =
|
||||
ActiveCall::global(cx).read_with(cx, |call, _| call.room().cloned())
|
||||
{
|
||||
if let Some(active_room) = ActiveCall::global(cx).read(cx).room().cloned() {
|
||||
active_room.update(cx, |_, cx| {
|
||||
cx.emit(room::Event::RemoteProjectInvitationDiscarded {
|
||||
project_id: self.project_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue