Merge pull request 'fix shutdown prompt when clicking notifications' (#90) from notifix into trunk
continuous-integration/drone/push Build is passing Details

Reviewed-on: #90
This commit is contained in:
Sarah Jamie Lewis 2021-07-02 17:07:15 -07:00
commit 20a0beda58
2 changed files with 3 additions and 3 deletions

View File

@ -238,7 +238,7 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
.setOngoing(true) .setOngoing(true)
// Add the cancel action to the notification which can // Add the cancel action to the notification which can
// be used to cancel the worker // 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() .build()
return ForegroundInfo(101, notification) 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 // single pane mode pushes; double pane mode reads AppState.selectedProfile/Conversation
var isLandscape = Provider.of<AppState>(navKey.currentContext!, listen: false).isLandscape(navKey.currentContext!); 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 (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"); print("messageview already open; popping before pushing replacement");
navKey.currentState?.pop(); navKey.currentState!.pop();
} }
navKey.currentState?.push( navKey.currentState?.push(
MaterialPageRoute<void>( MaterialPageRoute<void>(