diff --git a/notto-client/src-tauri/src/sync/service.rs b/notto-client/src-tauri/src/sync/service.rs index f7457fd..7e65aaf 100644 --- a/notto-client/src-tauri/src/sync/service.rs +++ b/notto-client/src-tauri/src/sync/service.rs @@ -18,7 +18,7 @@ use crate::{ pub enum SyncStatus { Synched, Syncing, - Error(String), + Error, Offline, NotConnected, } @@ -44,7 +44,7 @@ pub async fn run(handle: AppHandle) { if let Some(ts) = max_ts { if let Err(e) = update_last_sync(&state, workspace.clone(), ts).await { error!("{e:#}"); - emit(&handle, "sync-status", SyncStatus::Error(format!("{e:#}").to_string())); + emit(&handle, "sync-status", SyncStatus::Error); break 'sync; } } @@ -54,7 +54,7 @@ pub async fn run(handle: AppHandle) { emit(&handle, "sync-status", SyncStatus::Offline); info!("Couldn't connect to server"); } else { - emit(&handle, "sync-status", SyncStatus::Error(format!("{e:#}").to_string())); + emit(&handle, "sync-status", SyncStatus::Error); error!("{e:#}"); } break 'sync; @@ -66,7 +66,7 @@ pub async fn run(handle: AppHandle) { if let Some(ts) = max_ts { if let Err(e) = update_last_sync(&state, workspace.clone(), ts).await { error!("{e:#}"); - emit(&handle, "sync-status", SyncStatus::Error(format!("{e:#}").to_string())); + emit(&handle, "sync-status", SyncStatus::Error); break 'sync; } } @@ -76,7 +76,7 @@ pub async fn run(handle: AppHandle) { emit(&handle, "sync-status", SyncStatus::Offline); info!("Couldn't connect to server"); } else { - emit(&handle, "sync-status", SyncStatus::Error(format!("{e:#}").to_string())); + emit(&handle, "sync-status", SyncStatus::Error); error!("{e:#}"); } break 'sync;