Add setting to disable checking for notifications

This commit is contained in:
Gregory Schier
2025-10-28 06:55:56 -07:00
parent 2095cb88c2
commit b7ad490c9b
12 changed files with 102 additions and 64 deletions

View File

@@ -3,7 +3,7 @@ use std::time::SystemTime;
use crate::error::Result;
use crate::history::get_or_upsert_launch_info;
use chrono::{DateTime, Utc};
use log::debug;
use log::{debug, info};
use reqwest::Method;
use serde::{Deserialize, Serialize};
use tauri::{AppHandle, Emitter, Manager, Runtime, WebviewWindow};
@@ -77,6 +77,13 @@ impl YaakNotifier {
self.last_check = SystemTime::now();
if !app_handle.db().get_settings().check_notifications {
info!("Notifications are disabled. Skipping check.");
return Ok(());
}
debug!("Checking for notifications");
#[cfg(feature = "license")]
let license_check = {
use yaak_license::{check_license, LicenseCheckStatus};