From c3db90185b3dc947ca4019d48609c701fb2d72b9 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Tue, 13 Feb 2024 16:18:01 +0000 Subject: [PATCH] add logs, in attempt to locate regression --- .../customairshipextender/CustomNotificationProvider.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index c57819d19d03..f35d0b3c4383 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -177,9 +177,13 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil return; } + Log.i(TAG, "julessss -- "); + Log.i(TAG, "julessss -- payload: " + payload); + // Retrieve and check for existing notifications StatusBarNotification existingReportNotification = getActiveNotificationByReportId(context, reportID); - boolean hasExistingNotification = existingReportNotification != null; + boolean hasExistingNotification = existingReportNotification != null; // BOOL BROKE THE CONDITION? + Log.i(TAG, "julessss -- hasExistingNotification: " + hasExistingNotification); try { JsonMap reportMap = payload.get(ONYX_DATA_KEY).getList().get(1).getMap().get("value").getMap(); String reportId = reportMap.keySet().iterator().next(); @@ -192,6 +196,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil // Use the formatted alert message from the backend. Otherwise fallback on the message in the Onyx data. String message = alert != null ? alert : messageData.get("message").getList().get(0).getMap().get("text").getString(); String conversationName = payload.get("roomName") == null ? "" : payload.get("roomName").getString(""); + Log.i(TAG, "julessss -- conversationName: " + conversationName); // create the Person object who sent the latest report comment Bitmap personIcon = fetchIcon(context, avatar); @@ -205,6 +210,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil // Conversational styling should be applied to groups chats, rooms, and any 1:1 chats with more than one notification (ensuring the large profile image is always shown) if (!conversationName.isEmpty() || hasExistingNotification) { + Log.i(TAG, "julessss -- Conversational styling should be applied"); // Create the messaging style notification builder for this notification, associating it with the person who sent the report comment NotificationCompat.MessagingStyle messagingStyle = new NotificationCompat.MessagingStyle(person) .setGroupConversation(true)