feat: native auto-update

close #521
This commit is contained in:
edde746
2026-02-24 04:04:02 +01:00
parent d1d5b808bb
commit 403df31907
13 changed files with 319 additions and 2 deletions
+25
View File
@@ -931,6 +931,31 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
}
Widget _buildUpdateSection() {
// Native updater: simple tile that triggers Sparkle/WinSparkle native dialog
if (UpdateService.useNativeUpdater) {
return Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(
t.settings.updates,
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold),
),
),
ListTile(
focusNode: _focusTracker.get(_kCheckForUpdates),
leading: const AppIcon(Symbols.system_update_rounded, fill: 1),
title: Text(t.settings.checkForUpdates),
trailing: const AppIcon(Symbols.chevron_right_rounded, fill: 1),
onTap: () => UpdateService.checkForUpdatesNative(inBackground: false),
),
],
),
);
}
final hasUpdate = _updateInfo != null && _updateInfo!['hasUpdate'] == true;
return Card(