fixing notification bugs

This commit is contained in:
erinn 2021-07-02 16:27:09 -07:00
parent fbf79a230b
commit 624f7d3caa
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -173,9 +173,9 @@ class FlwtchState extends State<Flwtch> {
// single pane mode pushes; double pane mode reads AppState.selectedProfile/Conversation
var isLandscape = Provider.of<AppState>(navKey.currentContext!, listen: false).isLandscape(navKey.currentContext!);
if (Provider.of<Settings>(navKey.currentContext!, listen: false).uiColumns(isLandscape).length == 1) {
if (navKey.currentContext?.findAncestorWidgetOfExactType<MessageView>() != null) {
while (navKey.currentState!.canPop()) {
print("messageview already open; popping before pushing replacement");
navKey.currentState?.pop();
navKey.currentState!.pop();
}
navKey.currentState?.push(
MaterialPageRoute<void>(