mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-01 04:14:45 +03:00
feat: add periodic update check every 6 hours to ensure app is up to date
This commit is contained in:
parent
04db6b7da1
commit
4b55839fce
@ -66,6 +66,14 @@ fn main() {
|
||||
#[cfg(debug_assertions)]
|
||||
window.open_devtools();
|
||||
|
||||
tokio::task::spawn(async move {
|
||||
let mut six_hours = tokio::time::interval(tokio::time::Duration::new(6 * 60 * 60, 0));
|
||||
loop {
|
||||
six_hours.tick().await;
|
||||
_ = window.emit_and_trigger("tauri://update", ());
|
||||
}
|
||||
});
|
||||
|
||||
let app_handle = tauri_app.handle();
|
||||
|
||||
logs::init(&app_handle);
|
||||
|
Loading…
Reference in New Issue
Block a user