Navigate to the Follow Requests page from notification (#2757)

* Navigate to the Follow Requests page from notification

Fixes #2655

* Fix lock status
This commit is contained in:
Eva Tatarka 2022-11-07 14:04:07 -05:00 committed by GitHub
commit b39cb06748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 145 additions and 2 deletions

View file

@ -84,6 +84,8 @@ public class NotificationHelper {
*/
public static final String ACCOUNT_ID = "account_id";
public static final String TYPE = "type";
private static final String TAG = "NotificationHelper";
public static final String REPLY_ACTION = "REPLY_ACTION";
@ -268,6 +270,7 @@ public class NotificationHelper {
private static NotificationCompat.Builder newNotification(Context context, Notification body, AccountEntity account, boolean summary) {
Intent summaryResultIntent = new Intent(context, MainActivity.class);
summaryResultIntent.putExtra(ACCOUNT_ID, account.getId());
summaryResultIntent.putExtra(TYPE, body.getType().name());
TaskStackBuilder summaryStackBuilder = TaskStackBuilder.create(context);
summaryStackBuilder.addParentStack(MainActivity.class);
summaryStackBuilder.addNextIntent(summaryResultIntent);
@ -278,6 +281,7 @@ public class NotificationHelper {
// we have to switch account here
Intent eventResultIntent = new Intent(context, MainActivity.class);
eventResultIntent.putExtra(ACCOUNT_ID, account.getId());
eventResultIntent.putExtra(TYPE, body.getType().name());
TaskStackBuilder eventStackBuilder = TaskStackBuilder.create(context);
eventStackBuilder.addParentStack(MainActivity.class);
eventStackBuilder.addNextIntent(eventResultIntent);