mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-01 21:30:16 +02:00
Minor bug
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||||
|
import 'package:obtainium/providers/settings_provider.dart';
|
||||||
import 'package:obtainium/providers/source_provider.dart';
|
import 'package:obtainium/providers/source_provider.dart';
|
||||||
|
|
||||||
class ObtainiumNotification {
|
class ObtainiumNotification {
|
||||||
@@ -44,23 +45,19 @@ class SilentUpdateNotification extends ObtainiumNotification {
|
|||||||
SilentUpdateNotification(List<App> updates, bool succeeded, {int? id})
|
SilentUpdateNotification(List<App> updates, bool succeeded, {int? id})
|
||||||
: super(
|
: super(
|
||||||
id ?? 3,
|
id ?? 3,
|
||||||
succeeded
|
succeeded ? tr('appsUpdated') : tr('appsNotUpdated'),
|
||||||
? tr('appsUpdated')
|
|
||||||
: tr('appsNotUpdated'),
|
|
||||||
'',
|
'',
|
||||||
'APPS_UPDATED',
|
'APPS_UPDATED',
|
||||||
tr('appsUpdatedNotifChannel'),
|
tr('appsUpdatedNotifChannel'),
|
||||||
tr('appsUpdatedNotifDescription'),
|
tr('appsUpdatedNotifDescription'),
|
||||||
Importance.defaultImportance) {
|
Importance.defaultImportance) {
|
||||||
message = updates.length == 1
|
message = updates.length == 1
|
||||||
? tr(succeeded
|
? tr(succeeded ? 'xWasUpdatedToY' : 'xWasNotUpdatedToY',
|
||||||
? 'xWasUpdatedToY'
|
args: [updates[0].finalName, updates[0].latestVersion])
|
||||||
: 'xWasNotUpdatedToY',
|
: plural(
|
||||||
args: [updates[0].finalName, updates[0].latestVersion])
|
succeeded ? 'xAndNMoreUpdatesInstalled' : "xAndNMoreUpdatesFailed",
|
||||||
: plural(succeeded
|
updates.length - 1,
|
||||||
? 'xAndNMoreUpdatesInstalled'
|
args: [updates[0].finalName, (updates.length - 1).toString()]);
|
||||||
: "xAndNMoreUpdatesFailed",
|
|
||||||
updates.length - 1, args: [updates[0].finalName, (updates.length - 1).toString()]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,7 +211,7 @@ class NotificationsProvider {
|
|||||||
channelDescription: channelDescription,
|
channelDescription: channelDescription,
|
||||||
importance: importance,
|
importance: importance,
|
||||||
priority: importanceToPriority[importance]!,
|
priority: importanceToPriority[importance]!,
|
||||||
groupKey: 'dev.imranr.obtainium.$channelCode',
|
groupKey: '$obtainiumId.$channelCode',
|
||||||
progress: progPercent ?? 0,
|
progress: progPercent ?? 0,
|
||||||
maxProgress: 100,
|
maxProgress: 100,
|
||||||
showProgress: progPercent != null,
|
showProgress: progPercent != null,
|
||||||
|
Reference in New Issue
Block a user