mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
@@ -35,9 +35,9 @@ abstract class Update {
|
||||
}
|
||||
return;
|
||||
}
|
||||
int latest =
|
||||
DateTime.parse(res.data[0]['created_at']).millisecondsSinceEpoch ~/
|
||||
1000;
|
||||
final data = res.data[0];
|
||||
final int latest =
|
||||
DateTime.parse(data['created_at']).millisecondsSinceEpoch ~/ 1000;
|
||||
if (BuildConfig.buildTime >= latest) {
|
||||
if (!isAuto) {
|
||||
SmartDialog.showToast('已是最新版本');
|
||||
@@ -48,7 +48,7 @@ abstract class Update {
|
||||
builder: (context) {
|
||||
final ThemeData theme = Theme.of(context);
|
||||
Widget downloadBtn(String text, {String? ext}) => TextButton(
|
||||
onPressed: () => onDownload(res.data[0], ext: ext),
|
||||
onPressed: () => onDownload(data, ext: ext),
|
||||
child: Text(text),
|
||||
);
|
||||
return AlertDialog(
|
||||
@@ -60,11 +60,11 @@ abstract class Update {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'${res.data[0]['tag_name']}',
|
||||
'${data['tag_name']}',
|
||||
style: const TextStyle(fontSize: 20),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text('${res.data[0]['body']}'),
|
||||
Text('${data['body']}'),
|
||||
TextButton(
|
||||
onPressed: () => PageUtils.launchURL(
|
||||
'${Constants.sourceCodeUrl}/commits/main',
|
||||
|
||||
Reference in New Issue
Block a user