mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-02-18 00:17:40 +01:00
shorebird cleanup
This commit is contained in:
@@ -94,10 +94,20 @@ class _AppTitleState extends State<AppTitle> with WidgetsBindingObserver {
|
||||
if (updateStatus == UpdateStatus.outdated) {
|
||||
updater
|
||||
.update()
|
||||
.then((value) {
|
||||
.then((value) async {
|
||||
setState(() {
|
||||
_updateType = UpdateType.shorebird;
|
||||
});
|
||||
final nextPatch = await updater.readNextPatch();
|
||||
final currentVersion = Version.parse(packageInfoValue!.version);
|
||||
setState(() {
|
||||
_newVersion = Version(
|
||||
currentVersion.major,
|
||||
currentVersion.minor,
|
||||
currentVersion.patch,
|
||||
build: nextPatch?.number.toString() ?? '',
|
||||
);
|
||||
});
|
||||
})
|
||||
.catchError((e) {
|
||||
buildToast(title: AppLocalizations.current.failedToUpdate(e.toString()));
|
||||
|
||||
Reference in New Issue
Block a user