Re-introduce a macro for defining actions for ease of use
Co-Authored-By: Piotr Osiewicz <piotr@zed.dev> Co-Authored-By: Conrad Irwin <conrad@zed.dev>
This commit is contained in:
parent
2e43015664
commit
643146d768
5 changed files with 57 additions and 28 deletions
|
@ -15,8 +15,8 @@ use futures::{
|
|||
TryStreamExt,
|
||||
};
|
||||
use gpui::{
|
||||
serde_json, AnyModel, AnyWeakModel, AppContext, AsyncAppContext, Model, SemanticVersion, Task,
|
||||
WeakModel,
|
||||
actions, serde_json, AnyModel, AnyWeakModel, AppContext, AsyncAppContext, Model,
|
||||
SemanticVersion, Task, WeakModel,
|
||||
};
|
||||
use lazy_static::lazy_static;
|
||||
use parking_lot::RwLock;
|
||||
|
@ -70,14 +70,7 @@ pub const ZED_SECRET_CLIENT_TOKEN: &str = "618033988749894";
|
|||
pub const INITIAL_RECONNECTION_DELAY: Duration = Duration::from_millis(100);
|
||||
pub const CONNECTION_TIMEOUT: Duration = Duration::from_secs(5);
|
||||
|
||||
#[derive(Clone, Default, PartialEq, Deserialize)]
|
||||
pub struct SignIn;
|
||||
|
||||
#[derive(Clone, Default, PartialEq, Deserialize)]
|
||||
pub struct SignOut;
|
||||
|
||||
#[derive(Clone, Default, PartialEq, Deserialize)]
|
||||
pub struct Reconnect;
|
||||
actions!(SignIn, SignOut, Reconnect);
|
||||
|
||||
pub fn init_settings(cx: &mut AppContext) {
|
||||
TelemetrySettings::register(cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue