Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.
Rust downloadmanagerguihacktoberfesthomebrewlightweightlinuxlinux-distributionlocal-firstmacosmacos-packagemedia-toolboxopen-sourcerustsveltetauritrendingtrending-repositorieswindowswindows-desktopytdlp
feat: add function to clear thumbnail cache on logout and expose clear_thumbnail_cache command
Tonho4e153d854c34
diff --git a/src-tauri/src/commands/telegram.rs b/src-tauri/src/commands/telegram.rsindex 7d40ec3f..8033e07b 100644--- a/src-tauri/src/commands/telegram.rs+++ b/src-tauri/src/commands/telegram.rs@@ -125,6 +125,7 @@ pub async fn telegram_verify_2fa(pub async fn telegram_logout(state: tauri::State<'_, AppState>,) -> Result<(), String> {+ thumbnail_cache::clear_cache().await;auth::logout(&state.telegram_session).await.map_err(|e| e.to_string())@@ -547,3 +548,9 @@ pub async fn telegram_get_thumbnail(Ok(base64::engine::general_purpose::STANDARD.encode(&data))}++#[tauri::command]+pub async fn telegram_clear_thumbnail_cache() -> Result<(), String> {+ thumbnail_cache::clear_cache().await;+ Ok(())+}