forked from cwtch.im/cwtch-ui
fixing notification bugs
This commit is contained in:
parent
fbf79a230b
commit
624f7d3caa
|
@ -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)
|
||||
|
|
|
@ -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>(
|
||||
|
|
Loading…
Reference in New Issue