fix: clear opened URLs after retrieving them

This commit is contained in:
HorizonCode committed 2026-05-22 08:17:02 +02:00
1 parent f7fff7748a
commit 485cb3acf7
2 files changed
+4 -3

No files matched your search

+4 -1
View File
@@ -23,7 +23,10 @@ use crate::utils::{
#[tauri::command] #[tauri::command]
pub fn opened_urls(app: tauri::AppHandle) -> Vec<PathBuf> { pub fn opened_urls(app: tauri::AppHandle) -> Vec<PathBuf> {
app.state::<OpenedUrls>().0.lock().unwrap().clone() let args = app.state::<OpenedUrls>().0.lock().unwrap().clone();
app.state::<OpenedUrls>().0.lock().unwrap().clear();
args
} }
#[tauri::command] #[tauri::command]
-2
View File
@@ -52,8 +52,6 @@ pub fn run() {
} }
} }
app.state::<OpenedUrls>().0.lock().unwrap().extend(files.clone());
app.emit("opened", files.clone()).ok(); app.emit("opened", files.clone()).ok();
} }
})); }));