Merge pull request 'fix shutdown prompt when clicking notifications' (#90) from notifix into trunk
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Reviewed-on: #90
This commit is contained in:
commit
20a0beda58
|
@ -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)
|
||||||
|
|
|
@ -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>(
|
||||||
|
|
Loading…
Reference in New Issue