aboutsummaryrefslogtreecommitdiff
path: root/src/update.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/update.rs')
-rw-r--r--src/update.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/update.rs b/src/update.rs
index 1183a7eb..6a0b586b 100644
--- a/src/update.rs
+++ b/src/update.rs
@@ -437,6 +437,7 @@ pub fn self_update() -> Result<Version, String> {
/// Background update check: only surface availability and release notes.
/// Runs in a background thread at startup.
pub fn auto_update(events: tokio::sync::mpsc::Sender<crate::events::AppEvent>) {
+ crate::logging::update_check_started();
if let Ok(version) = env::var(FAKE_UPDATE_VERSION_ENV) {
let version = version.trim();
if !version.is_empty() {
@@ -459,9 +460,14 @@ pub fn auto_update(events: tokio::sync::mpsc::Sender<crate::events::AppEvent>) {
let release = match check_latest() {
Ok(Some(r)) => r,
- _ => return, // up to date or failed — silently do nothing
+ Ok(None) => return,
+ Err(err) => {
+ crate::logging::update_check_failed(&err);
+ return;
+ }
};
+ crate::logging::update_available(&release.version.to_string());
tracing::info!(
"new version v{} available at {}",
release.version,