Skip to content

Commit 2fe1a37

Browse files
committed
fix:修复更新逻辑
1 parent 0f76c53 commit 2fe1a37

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/screen/home_screen.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'dart:convert';
22
import 'dart:io';
3+
import 'dart:math';
34

45
import 'package:alist/entity/app_version_resp.dart';
56
import 'package:alist/l10n/intl_keys.dart';
@@ -118,7 +119,7 @@ class _HomeScreenState extends State<HomeScreen> {
118119
var versionInt = 0;
119120
var arr = version.split(".");
120121
for (int i = 0; i < arr.length; i++) {
121-
versionInt += int.parse(arr[i]) * (100 ^ i);
122+
versionInt += int.parse(arr[i]) * pow(100, arr.length - i - 1).toInt();
122123
}
123124
return versionInt;
124125
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1616
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1717
# In Windows, build-name is used as the major, minor, and patch parts
1818
# of the product and file versions while build-number is used as the build suffix.
19-
version: 1.1.0+11
19+
version: 1.0.10+11
2020

2121
environment:
2222
sdk: '>=2.19.6 <3.0.0'

0 commit comments

Comments
 (0)