refactor: partially migrate to singleton pattern

This commit is contained in:
zhom
2025-07-31 22:29:08 +04:00
parent 4997854577
commit 5b31cfaf32
9 changed files with 131 additions and 1032 deletions
+4 -4
View File
@@ -47,16 +47,16 @@ impl Default for BackgroundUpdateState {
}
pub struct VersionUpdater {
version_service: BrowserVersionService,
auto_updater: AutoUpdater,
version_service: &'static BrowserVersionService,
auto_updater: &'static AutoUpdater,
app_handle: Option<tauri::AppHandle>,
}
impl VersionUpdater {
pub fn new() -> Self {
Self {
version_service: BrowserVersionService::new(),
auto_updater: AutoUpdater::new(),
version_service: BrowserVersionService::instance(),
auto_updater: AutoUpdater::instance(),
app_handle: None,
}
}