refactor(updates): pass typed runtime policy to deskup
This commit is contained in:
1 parent
1ef8edc8bc
commit
d83f94afd5
13 files changed
+158
-102
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import '../diagnostics/app_diagnostics.dart';
|
||||
import 'app_update_configuration.dart';
|
||||
|
||||
import 'package:deskup/deskup.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
@@ -26,7 +27,11 @@ AppUpdateBridge appUpdateBridge(Ref ref) {
|
||||
// Application adapter: Riverpod ownership and the macOS workspace quit gate.
|
||||
class AppUpdateBridge {
|
||||
AppUpdateBridge([MethodChannel channel = appUpdatesChannel])
|
||||
: _updater = Deskup(channel: channel);
|
||||
: _updater = Deskup(
|
||||
channel: channel,
|
||||
windows: windowsUpdateConfiguration(),
|
||||
macos: macosUpdateConfiguration(),
|
||||
);
|
||||
|
||||
final Deskup _updater;
|
||||
Stream<UpdateStatus> get events => _updater.events;
|
||||
@@ -65,7 +70,7 @@ class AppUpdateBridge {
|
||||
Future<void> check() => _updater.check();
|
||||
Future<void> download() => _updater.download();
|
||||
Future<void> validateInstall() => _updater.validateInstall();
|
||||
Future<void> install() => _updater.install();
|
||||
Future<void> install() => _updater.install(silent: true, restart: true);
|
||||
Future<void> setAutomaticChecks(bool enabled) =>
|
||||
_updater.setAutomaticChecks(enabled);
|
||||
|
||||
|
||||
Reference in new issue
Block a user