mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2026-03-22 10:15:50 +05:30
refactor: init compat with flatpak
This commit is contained in:
@@ -184,6 +184,16 @@ fn get_current_app_path() -> Result<String, String> {
|
||||
.into_owned())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn is_flatpak() -> bool {
|
||||
std::env::var("FLATPAK").is_ok()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn get_appimage_path() -> Option<String> {
|
||||
std::env::var("APPDIR").ok()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn update_config(
|
||||
new_config: Config,
|
||||
@@ -604,6 +614,8 @@ pub async fn run() {
|
||||
get_config_file_path,
|
||||
restart_websocket_server,
|
||||
get_current_app_path,
|
||||
is_flatpak,
|
||||
get_appimage_path
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
||||
Reference in New Issue
Block a user