Now its fixed for good. That was easier than I thought

(cherry picked from commit 2076818220)
This commit is contained in:
LucasGGamerM 2023-01-11 11:19:30 -03:00
parent cca2fc4199
commit f17eb9ebdc
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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)