fix autolaunch name in dev/prod
This commit is contained in:
parent
bf62054c2b
commit
2080fb897b
@ -111,6 +111,7 @@ impl AppConfig {
|
|||||||
pub async fn match_auto_launch(&mut self, pool: &SqlitePool) -> Result<(), SetupError> {
|
pub async fn match_auto_launch(&mut self, pool: &SqlitePool) -> Result<(), SetupError> {
|
||||||
let mgr = self.auto_launch_manager()?;
|
let mgr = self.auto_launch_manager()?;
|
||||||
let is_enabled = mgr.is_enabled()?;
|
let is_enabled = mgr.is_enabled()?;
|
||||||
|
dbg!(is_enabled);
|
||||||
if is_enabled != self.start_on_login {
|
if is_enabled != self.start_on_login {
|
||||||
self.start_on_login = is_enabled;
|
self.start_on_login = is_enabled;
|
||||||
self.save(pool).await?;
|
self.save(pool).await?;
|
||||||
@ -122,7 +123,7 @@ impl AppConfig {
|
|||||||
let path_buf = std::env::current_exe()
|
let path_buf = std::env::current_exe()
|
||||||
.map_err(|e| auto_launch::Error::Io(e))?;
|
.map_err(|e| auto_launch::Error::Io(e))?;
|
||||||
|
|
||||||
let name = if cfg!(debug_assertions) { "Creddy" } else { "Creddy (dev)" };
|
let name = if cfg!(debug_assertions) { "Creddy (dev)" } else { "Creddy" };
|
||||||
let mut builder = AutoLaunchBuilder::new();
|
let mut builder = AutoLaunchBuilder::new();
|
||||||
builder.set_app_name(name);
|
builder.set_app_name(name);
|
||||||
builder.set_app_path(&path_buf.to_string_lossy());
|
builder.set_app_path(&path_buf.to_string_lossy());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user