Browse Source

fix compose notification action not recreating MainActivity (#4249)

closes #4247
pull/4096/head
Konrad Pozniak 2 years ago committed by GitHub
parent
commit
fa8bede7d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java

3
app/src/main/java/com/keylesspalace/tusky/components/notifications/NotificationHelper.java

@ -456,7 +456,8 @@ public class NotificationHelper {
Intent composeIntent = MainActivity.composeIntent(context, composeOptions, account.getId(), body.getId(), (int)account.getId());
composeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// make sure a new instance of MainActivity is started and old ones get destroyed
composeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
return PendingIntent.getActivity(context.getApplicationContext(),
notificationId,

Loading…
Cancel
Save