Remove ViewContext::dispatch_action

This commit is contained in:
Antonio Scandurra 2023-05-01 15:48:41 +02:00
parent d815fc88ae
commit c4472b0786
41 changed files with 574 additions and 670 deletions

View file

@ -1,3 +1,4 @@
use crate::toggle_screen_sharing;
use call::ActiveCall;
use gpui::{
color::Color,
@ -7,8 +8,6 @@ use gpui::{
};
use settings::Settings;
use crate::ToggleScreenSharing;
pub fn init(cx: &mut AppContext) {
let active_call = ActiveCall::global(cx);
@ -54,7 +53,7 @@ impl View for SharingStatusIndicator {
.aligned()
})
.on_click(MouseButton::Left, |_, _, cx| {
cx.dispatch_action(ToggleScreenSharing);
toggle_screen_sharing(&Default::default(), cx)
})
.into_any()
}