More work on silent updates (not working in BG)

This commit is contained in:
Imran Remtulla
2022-09-24 18:43:05 -04:00
parent b65c6e1d41
commit 0a9373e65a
6 changed files with 73 additions and 33 deletions

View File

@@ -33,6 +33,22 @@ class UpdateNotification extends ObtainiumNotification {
}
}
class SilentUpdateNotification extends ObtainiumNotification {
SilentUpdateNotification(List<App> updates)
: super(
3,
'Apps Updated',
'',
'APPS_UPDATED',
'Apps Updated',
'Notifies the user that updates to one or more Apps were applied in the background',
Importance.defaultImportance) {
message = updates.length == 1
? '${updates[0].name} was updated to ${updates[0].latestVersion}.'
: '${(updates.length == 2 ? '${updates[0].name} and ${updates[1].name}' : '${updates[0].name} and ${updates.length - 1} more apps')} were updated.';
}
}
class ErrorCheckingUpdatesNotification extends ObtainiumNotification {
ErrorCheckingUpdatesNotification(String error)
: super(