Skip to content

Commit

Permalink
fix: 自动更新失败
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostenEditor committed Nov 5, 2024
1 parent ef45802 commit 17d1a0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/components/updater.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class UpdateBottomSheet extends StatefulWidget {
class _UpdateBottomSheetState extends State<UpdateBottomSheet> {
static Map<String, _DownloadTask> downloading = {};
bool failed = false;
double? progress;

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -79,7 +78,7 @@ class _UpdateBottomSheetState extends State<UpdateBottomSheet> {
listenable: downloading[widget.url]!.progress,
builder: (context, _) {
return CircularProgressIndicator(
strokeWidth: 2, value: progress, backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest);
strokeWidth: 2, value: downloading[widget.url]!.progress.value, backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest);
})),
])
: failed
Expand Down
2 changes: 1 addition & 1 deletion packages/api/lib/src/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ class UpdateResp {

UpdateResp.fromJson(Json json)
: assets = List.generate(json['assets'].length, (index) => UpdateRespAsset.fromJson(json['assets'][index])),
tagName = Version.fromString(json['tag_name']),
tagName = Version.fromString(json['tag_name'].substring(1)),
comment = json['body'],
createAt = (json['published_at'] as String).toDateTime();
}
Expand Down

0 comments on commit 17d1a0e

Please sign in to comment.