diff --git a/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java b/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java index 671fc02ca..ba3aecb1f 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java +++ b/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java @@ -56,7 +56,7 @@ public class MainActivity extends FragmentStackActivity{ fragment.setArguments(args); showFragmentClearingBackStack(fragment); if(intent.getBooleanExtra("fromNotification", false) && intent.hasExtra("notification")){ - Notification notification=Parcels.unwrap(intent.getParcelableExtra("notification"+intent.getParcelableExtra("notificationID"))); + Notification notification=Parcels.unwrap(intent.getParcelableExtra("notification")); showFragmentForNotification(notification, session.getID()); }else if(intent.getBooleanExtra("compose", false)){ showCompose(); diff --git a/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java b/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java index 0d1f1bb85..a667f8ea1 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java +++ b/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java @@ -136,12 +136,12 @@ public class PushNotificationReceiver extends BroadcastReceiver{ contentIntent.putExtra("accountID", accountID); contentIntent.putExtra("notificationID", notificationID); if(notification!=null){ - contentIntent.putExtra("notification" + notificationID, Parcels.wrap(notification)); + contentIntent.putExtra("notification", Parcels.wrap(notification)); } builder.setContentTitle(pn.title) .setContentText(pn.body) .setStyle(new Notification.BigTextStyle().bigText(pn.body)) - .setContentIntent(PendingIntent.getActivity(context, accountID.hashCode() & 0xFFFF, contentIntent, PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT)) + .setContentIntent(PendingIntent.getActivity(context, notificationID, contentIntent, PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT)) .setWhen(notification==null ? System.currentTimeMillis() : notification.createdAt.toEpochMilli()) .setShowWhen(true) .setCategory(Notification.CATEGORY_SOCIAL)