mirror of
https://github.com/Drop-OSS/drop-app-kt.git
synced 2026-02-04 06:51:18 +01:00
chore(errors): Moved autostart commands to autostart.rs
This commit is contained in:
@@ -65,3 +65,12 @@ pub fn sync_autostart_on_startup(app: &AppHandle) -> Result<(), String> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
#[tauri::command]
|
||||
pub fn toggle_autostart(app: AppHandle, enabled: bool) -> Result<(), String> {
|
||||
toggle_autostart_logic(app, enabled)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn get_autostart_enabled(app: AppHandle) -> Result<bool, tauri_plugin_autostart::Error> {
|
||||
get_autostart_enabled_logic(app)
|
||||
}
|
||||
|
||||
@@ -14,12 +14,3 @@ pub fn fetch_state(
|
||||
drop(guard);
|
||||
Ok(cloned_state)
|
||||
}
|
||||
#[tauri::command]
|
||||
pub fn toggle_autostart(app: AppHandle, enabled: bool) -> Result<(), String> {
|
||||
toggle_autostart_logic(app, enabled)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn get_autostart_enabled(app: AppHandle) -> Result<bool, tauri_plugin_autostart::Error> {
|
||||
get_autostart_enabled_logic(app)
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ mod error;
|
||||
mod process;
|
||||
mod remote;
|
||||
|
||||
use crate::commands::{get_autostart_enabled, toggle_autostart};
|
||||
use crate::database::db::DatabaseImpls;
|
||||
use autostart::{get_autostart_enabled, toggle_autostart};
|
||||
use cleanup::{cleanup_and_exit, quit};
|
||||
use commands::fetch_state;
|
||||
use database::commands::{
|
||||
|
||||
Reference in New Issue
Block a user