mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-15 14:16:43 +02:00
Compare commits
1 Commits
v0.5.8-bet
...
v0.5.9-bet
Author | SHA1 | Date | |
---|---|---|---|
52ce5b19c4 |
@ -14,7 +14,7 @@ import 'package:dynamic_color/dynamic_color.dart';
|
|||||||
import 'package:device_info_plus/device_info_plus.dart';
|
import 'package:device_info_plus/device_info_plus.dart';
|
||||||
|
|
||||||
const String currentReleaseTag =
|
const String currentReleaseTag =
|
||||||
'v0.5.8-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES
|
'v0.5.9-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES
|
||||||
|
|
||||||
const String bgUpdateCheckTaskName = 'bg-update-check';
|
const String bgUpdateCheckTaskName = 'bg-update-check';
|
||||||
|
|
||||||
|
@ -325,6 +325,7 @@ class AppsProvider with ChangeNotifier {
|
|||||||
|
|
||||||
Future<List<App>> checkUpdates({DateTime? ignoreAfter}) async {
|
Future<List<App>> checkUpdates({DateTime? ignoreAfter}) async {
|
||||||
List<App> updates = [];
|
List<App> updates = [];
|
||||||
|
Map<String, List<String>> errors = {};
|
||||||
if (!gettingUpdates) {
|
if (!gettingUpdates) {
|
||||||
gettingUpdates = true;
|
gettingUpdates = true;
|
||||||
|
|
||||||
@ -340,14 +341,31 @@ class AppsProvider with ChangeNotifier {
|
|||||||
DateTime.fromMicrosecondsSinceEpoch(0))
|
DateTime.fromMicrosecondsSinceEpoch(0))
|
||||||
.compareTo(apps[b]!.app.lastUpdateCheck ??
|
.compareTo(apps[b]!.app.lastUpdateCheck ??
|
||||||
DateTime.fromMicrosecondsSinceEpoch(0)));
|
DateTime.fromMicrosecondsSinceEpoch(0)));
|
||||||
|
|
||||||
for (int i = 0; i < appIds.length; i++) {
|
for (int i = 0; i < appIds.length; i++) {
|
||||||
App? newApp = await getUpdate(appIds[i]);
|
App? newApp;
|
||||||
|
try {
|
||||||
|
newApp = await getUpdate(appIds[i]);
|
||||||
|
} catch (e) {
|
||||||
|
var tempIds = errors.remove(e.toString());
|
||||||
|
tempIds ??= [];
|
||||||
|
tempIds.add(appIds[i]);
|
||||||
|
errors.putIfAbsent(e.toString(), () => tempIds!);
|
||||||
|
}
|
||||||
if (newApp != null) {
|
if (newApp != null) {
|
||||||
updates.add(newApp);
|
updates.add(newApp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gettingUpdates = false;
|
gettingUpdates = false;
|
||||||
}
|
}
|
||||||
|
if (errors.isNotEmpty) {
|
||||||
|
String finalError = '';
|
||||||
|
for (var e in errors.keys) {
|
||||||
|
finalError +=
|
||||||
|
'$e ${errors[e]!.map((e) => apps[e]!.app.name).toString()}. ';
|
||||||
|
}
|
||||||
|
throw finalError;
|
||||||
|
}
|
||||||
return updates;
|
return updates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 0.5.8+29 # When changing this, update the tag in main() accordingly
|
version: 0.5.9+30 # When changing this, update the tag in main() accordingly
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.19.0-79.0.dev <3.0.0'
|
sdk: '>=2.19.0-79.0.dev <3.0.0'
|
||||||
|
Reference in New Issue
Block a user