mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-16 01:02:46 -04:00
refactor(SysUpdate): Explicit Run on Startup option in settings
- Relocated DMS System Updater to System Setting section - Removed forced auto refresh upon update & widget loading
This commit is contained in:
@@ -75,16 +75,6 @@ DankPopout {
|
||||
close();
|
||||
}
|
||||
|
||||
onShouldBeVisibleChanged: {
|
||||
if (!shouldBeVisible) {
|
||||
return;
|
||||
}
|
||||
const stale = !SystemUpdateService.lastCheckUnix || (Date.now() / 1000 - SystemUpdateService.lastCheckUnix) > 300;
|
||||
if (stale && !SystemUpdateService.isChecking && !SystemUpdateService.isUpgrading) {
|
||||
SystemUpdateService.checkForUpdates();
|
||||
}
|
||||
}
|
||||
|
||||
content: Component {
|
||||
Rectangle {
|
||||
id: updaterPanel
|
||||
|
||||
@@ -93,6 +93,13 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
text: I18n.tr("Check on startup")
|
||||
description: I18n.tr("When enabled, checks updates on startup. When disabled, only the interval above or a manual refresh runs a check.")
|
||||
checked: SettingsData.updaterCheckOnStart
|
||||
onToggled: checked => SettingsData.set("updaterCheckOnStart", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
text: I18n.tr("Include Flatpak updates")
|
||||
description: I18n.tr("Apply Flatpak updates alongside system updates when running 'Update All'.")
|
||||
|
||||
Reference in New Issue
Block a user