mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Improved updater
This commit is contained in:
parent
39c871b72d
commit
a4ae8c2cdf
7 changed files with 66 additions and 64 deletions
|
@ -18,7 +18,6 @@ class UpdateAvailableData {
|
|||
final bool? canAutoupdate;
|
||||
final bool disabled;
|
||||
String? changelog;
|
||||
bool? updateAvailable;
|
||||
|
||||
UpdateAvailableData({
|
||||
required this.currentVersion,
|
||||
|
@ -28,7 +27,6 @@ class UpdateAvailableData {
|
|||
required this.canAutoupdate,
|
||||
required this.disabled,
|
||||
this.changelog,
|
||||
this.updateAvailable
|
||||
});
|
||||
|
||||
factory UpdateAvailableData.fromJson(Map<String, dynamic> json) => UpdateAvailableData(
|
||||
|
@ -39,7 +37,15 @@ class UpdateAvailableData {
|
|||
canAutoupdate: json["can_autoupdate"],
|
||||
disabled: json["disabled"],
|
||||
changelog: json["changelog"],
|
||||
updateAvailable: json['update_available']
|
||||
);
|
||||
|
||||
factory UpdateAvailableData.fromJsonUpdate(Map<String, dynamic> json) => UpdateAvailableData(
|
||||
currentVersion: json["current_version"],
|
||||
newVersion: json["new_version"],
|
||||
announcement: json["announcement"],
|
||||
announcementUrl: json["announcement_url"],
|
||||
canAutoupdate: json["can_autoupdate"],
|
||||
disabled: json["disabled"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
|
@ -50,6 +56,5 @@ class UpdateAvailableData {
|
|||
"can_autoupdate": canAutoupdate,
|
||||
"disabled": disabled,
|
||||
"changelog": changelog,
|
||||
"update_available": updateAvailable
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue