mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-13 13:26:43 +02:00
Minor bug: avoid showing empty dialog when notifications tapped (#2250)
This commit is contained in:
@ -197,26 +197,28 @@ class NotificationsProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_showNotificationPayload(String? payload, {bool doublePop = false}) {
|
_showNotificationPayload(String? payload, {bool doublePop = false}) {
|
||||||
var title = (payload ?? '\n\n').split('\n').first;
|
if (payload?.isNotEmpty == true) {
|
||||||
var content = (payload ?? '\n\n').split('\n').sublist(1).join('\n');
|
var title = (payload ?? '\n\n').split('\n').first;
|
||||||
globalNavigatorKey.currentState?.push(
|
var content = (payload ?? '\n\n').split('\n').sublist(1).join('\n');
|
||||||
PageRouteBuilder(
|
globalNavigatorKey.currentState?.push(
|
||||||
pageBuilder: (context, _, __) => AlertDialog(
|
PageRouteBuilder(
|
||||||
title: Text(title),
|
pageBuilder: (context, _, __) => AlertDialog(
|
||||||
content: Text(content),
|
title: Text(title),
|
||||||
actions: [
|
content: Text(content),
|
||||||
TextButton(
|
actions: [
|
||||||
onPressed: () {
|
TextButton(
|
||||||
Navigator.of(context).pop(null);
|
onPressed: () {
|
||||||
if (doublePop) {
|
|
||||||
Navigator.of(context).pop(null);
|
Navigator.of(context).pop(null);
|
||||||
}
|
if (doublePop) {
|
||||||
},
|
Navigator.of(context).pop(null);
|
||||||
child: Text(tr('ok'))),
|
}
|
||||||
],
|
},
|
||||||
|
child: Text(tr('ok'))),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> cancel(int id) async {
|
Future<void> cancel(int id) async {
|
||||||
|
Reference in New Issue
Block a user