1
1
mirror of https://github.com/neosubhamoy/neodlp.git synced 2026-03-22 16:05:50 +05:30

refactor: init compat with flatpak

This commit is contained in:
2026-02-23 11:02:07 +05:30
Verified
parent 2fe4c43e7a
commit 6800ae73d8
4 changed files with 56 additions and 1 deletions

View File

@@ -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");