Skip to content

Commit

Permalink
deleteWithNotificationId
Browse files Browse the repository at this point in the history
  • Loading branch information
FatihUtkuKara committed May 24, 2024
1 parent 3c5794d commit 1dd2cc7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ public static boolean readAllPushMessages(Context context) {
return false;
}

public boolean readPushMessagesWithPushId(Context context, String pushId) {
public static boolean readPushMessagesWithPushId(Context context, String pushId) {
boolean isUpdated = false;
try {
String jsonString = SharedPreference.getString(context, Constants.PAYLOAD_SP_KEY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public void generateNotification(Context context, Message pushMessage, Bitmap im

if(mNotificationManager != null) {
mNotificationManager.notify(notificationId, mBuilder.build());
PayloadUtils.updatePayloadWithId(context,pushMessage.getPushId(),notificationId);
}

} catch (Exception e) {
Expand Down Expand Up @@ -274,12 +273,6 @@ private NotificationCompat.Builder createNotificationBuilder(Context context,

mBuilder.setContentIntent(contentIntent);

// TODO : Check the number of buttons and related
// pending intents here when BE gets ready and
// set them accordingly.
/*
mBuilder.addAction(R.drawable.notification_button, "Open" , contentIntent);
*/

return mBuilder;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
} else {
PayloadUtils.addPushMessageWithId(this, pushMessage, notificationLoginId);
}
PayloadUtils.updatePayloadWithId(this,pushMessage.getPushId(),notificationId);

} else {
EuroLogger.debugLog("remoteMessageData transfrom problem");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ public static void updatePayloadWithId(Context context, String pushId, Integer n
String existingPushId = payloadObject.optString("pushId", "");

if (existingPushId.equals(pushId)) {
// Güncelleme işlemlerini yap
payloadObject.put("notificationId", notificationId);

// Güncellenmiş JSON'ı kaydet
Expand Down

0 comments on commit 1dd2cc7

Please sign in to comment.