Register actions globally before main

This commit is contained in:
Nathan Sobo 2023-11-07 20:58:37 -07:00
parent 80630cd4d9
commit 814e62050c
8 changed files with 33 additions and 169 deletions

View file

@ -80,7 +80,6 @@ pub fn init(client: &Arc<Client>, cx: &mut AppContext) {
init_settings(cx);
let client = Arc::downgrade(client);
cx.register_action_type::<SignIn>();
cx.on_action({
let client = client.clone();
move |_: &SignIn, cx| {
@ -93,7 +92,6 @@ pub fn init(client: &Arc<Client>, cx: &mut AppContext) {
}
});
cx.register_action_type::<SignOut>();
cx.on_action({
let client = client.clone();
move |_: &SignOut, cx| {
@ -106,7 +104,6 @@ pub fn init(client: &Arc<Client>, cx: &mut AppContext) {
}
});
cx.register_action_type::<Reconnect>();
cx.on_action({
let client = client.clone();
move |_: &Reconnect, cx| {