mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-01 21:30:16 +02:00
Switch back to parallelized BG task (#963) + better logging
This commit is contained in:
@@ -292,7 +292,7 @@ class _AppPageState extends State<AppPage> {
|
||||
if (source?.enforceTrackOnly == true) {
|
||||
app.app.additionalSettings['trackOnly'] = true;
|
||||
// ignore: use_build_context_synchronously
|
||||
showError(tr('appsFromSourceAreTrackOnly'), context);
|
||||
showMessage(tr('appsFromSourceAreTrackOnly'), context);
|
||||
}
|
||||
if (app.app.additionalSettings['versionDetection'] ==
|
||||
'releaseDateAsVersion') {
|
||||
@@ -343,7 +343,7 @@ class _AppPageState extends State<AppPage> {
|
||||
);
|
||||
if (app?.app.installedVersion != null && !trackOnly) {
|
||||
// ignore: use_build_context_synchronously
|
||||
showError(tr('appsUpdated'), context);
|
||||
showMessage(tr('appsUpdated'), context);
|
||||
}
|
||||
if (res.isNotEmpty && mounted) {
|
||||
Navigator.of(context).pop();
|
||||
|
@@ -705,7 +705,7 @@ class AppsPageState extends State<AppsPage> {
|
||||
return <String>[];
|
||||
}).then((value) {
|
||||
if (shouldInstallUpdates) {
|
||||
showError(tr('appsUpdated'), context);
|
||||
showMessage(tr('appsUpdated'), context);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -81,7 +81,7 @@ class _ImportExportPageState extends State<ImportExportPage> {
|
||||
});
|
||||
appsProvider.addAppsByURL(urls).then((errors) {
|
||||
if (errors.isEmpty) {
|
||||
showError(tr('importedX', args: [plural('apps', urls.length)]),
|
||||
showMessage(tr('importedX', args: [plural('apps', urls.length)]),
|
||||
context);
|
||||
} else {
|
||||
showDialog(
|
||||
@@ -111,7 +111,7 @@ class _ImportExportPageState extends State<ImportExportPage> {
|
||||
sp: settingsProvider)
|
||||
.then((String? result) {
|
||||
if (result != null) {
|
||||
showError(tr('exportedTo', args: [result]), context);
|
||||
showMessage(tr('exportedTo', args: [result]), context);
|
||||
}
|
||||
}).catchError((e) {
|
||||
showError(e, context);
|
||||
@@ -141,7 +141,7 @@ class _ImportExportPageState extends State<ImportExportPage> {
|
||||
}
|
||||
});
|
||||
appsProvider.addMissingCategories(settingsProvider);
|
||||
showError(tr('importedX', args: [plural('apps', value)]), context);
|
||||
showMessage(tr('importedX', args: [plural('apps', value)]), context);
|
||||
});
|
||||
} else {
|
||||
// User canceled the picker
|
||||
@@ -216,7 +216,7 @@ class _ImportExportPageState extends State<ImportExportPage> {
|
||||
var errors = await appsProvider.addAppsByURL(selectedUrls);
|
||||
if (errors.isEmpty) {
|
||||
// ignore: use_build_context_synchronously
|
||||
showError(
|
||||
showMessage(
|
||||
tr('importedX',
|
||||
args: [plural('apps', selectedUrls.length)]),
|
||||
context);
|
||||
@@ -274,7 +274,7 @@ class _ImportExportPageState extends State<ImportExportPage> {
|
||||
var errors = await appsProvider.addAppsByURL(selectedUrls);
|
||||
if (errors.isEmpty) {
|
||||
// ignore: use_build_context_synchronously
|
||||
showError(
|
||||
showMessage(
|
||||
tr('importedX', args: [plural('apps', selectedUrls.length)]),
|
||||
context);
|
||||
} else {
|
||||
|
@@ -535,7 +535,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
onPressed: () {
|
||||
context.read<LogsProvider>().get().then((logs) {
|
||||
if (logs.isEmpty) {
|
||||
showError(ObtainiumError(tr('noLogs')), context);
|
||||
showMessage(ObtainiumError(tr('noLogs')), context);
|
||||
} else {
|
||||
showDialog(
|
||||
context: context,
|
||||
@@ -577,7 +577,7 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
const Duration(seconds: 0),
|
||||
bgUpdateCheckAlarmId + 200,
|
||||
bgUpdateCheck);
|
||||
showError(tr('bgTaskStarted'), context);
|
||||
showMessage(tr('bgTaskStarted'), context);
|
||||
},
|
||||
child: Text(tr('runBgCheckNow')))
|
||||
],
|
||||
|
Reference in New Issue
Block a user