diff --git a/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt b/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt index 7cb33d71..8fcf423b 100644 --- a/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt +++ b/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt @@ -238,7 +238,7 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) : .setOngoing(true) // Add the cancel action to the notification which can // be used to cancel the worker - .addAction(android.R.drawable.ic_delete, cancel, PendingIntent.getActivity(applicationContext, 1, cancelIntent, PendingIntent.FLAG_UPDATE_CURRENT)) + .addAction(android.R.drawable.ic_delete, cancel, PendingIntent.getActivity(applicationContext, 2, cancelIntent, PendingIntent.FLAG_UPDATE_CURRENT)) .build() return ForegroundInfo(101, notification) diff --git a/lib/main.dart b/lib/main.dart index f74ddbdc..d066e39b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -173,9 +173,9 @@ class FlwtchState extends State { // single pane mode pushes; double pane mode reads AppState.selectedProfile/Conversation var isLandscape = Provider.of(navKey.currentContext!, listen: false).isLandscape(navKey.currentContext!); if (Provider.of(navKey.currentContext!, listen: false).uiColumns(isLandscape).length == 1) { - if (navKey.currentContext?.findAncestorWidgetOfExactType() != null) { + while (navKey.currentState!.canPop()) { print("messageview already open; popping before pushing replacement"); - navKey.currentState?.pop(); + navKey.currentState!.pop(); } navKey.currentState?.push( MaterialPageRoute(