diff --git a/app/src/main/java/app/closer/notifications/PartnerNotificationManager.kt b/app/src/main/java/app/closer/notifications/PartnerNotificationManager.kt index 57aa7fed..cc97d9f5 100644 --- a/app/src/main/java/app/closer/notifications/PartnerNotificationManager.kt +++ b/app/src/main/java/app/closer/notifications/PartnerNotificationManager.kt @@ -78,21 +78,10 @@ class PartnerNotificationManager @Inject constructor( val route = type.routeFor(payload, coupleId) val notificationId = collapseId(type, coupleId) - val avatar = payload.avatarUrl?.takeIf { it.isNotBlank() }?.let { loadAvatar(it) } - showNotification(notificationId, type, route, avatar) + showNotification(notificationId, type, route) } - /** Best-effort partner-avatar load for a richer notification; null on any failure. */ - private suspend fun loadAvatar(url: String): android.graphics.Bitmap? = runCatching { - val loader = coil.ImageLoader(context) - val request = coil.request.ImageRequest.Builder(context) - .data(url) - .allowHardware(false) - .build() - (loader.execute(request).drawable as? android.graphics.drawable.BitmapDrawable)?.bitmap - }.getOrNull() - /** * Maps a remote FCM message type to a [PartnerNotificationType] and shows it. * @@ -125,8 +114,7 @@ class PartnerNotificationManager @Inject constructor( private fun showNotification( id: Int, type: PartnerNotificationType, - route: String, - largeIcon: android.graphics.Bitmap? = null + route: String ) { if (!NotificationManagerCompat.from(context).areNotificationsEnabled()) return @@ -147,6 +135,8 @@ class PartnerNotificationManager @Inject constructor( PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE ) + // No large icon: notifications show only the monochrome Closer mark (the small icon). We + // deliberately do NOT surface the partner's photo here. val notification = NotificationCompat.Builder(context, type.channelId) .setSmallIcon(R.drawable.ic_notification_closer) .setContentTitle(type.title) @@ -154,7 +144,6 @@ class PartnerNotificationManager @Inject constructor( .setAutoCancel(true) .setContentIntent(pendingIntent) .setCategory(NotificationCompat.CATEGORY_SOCIAL) - .apply { if (largeIcon != null) setLargeIcon(largeIcon) } .build() NotificationManagerCompat.from(context).notify(id, notification) @@ -437,7 +426,10 @@ data class PartnerNotificationPayload( val challengeId: String? = null, /** Completed-date id, used to deep link a date-reflection push into the reflection screen. */ val dateId: String? = null, - /** Sender's avatar URL, used as the notification large icon when present. */ + /** + * Sender's avatar URL. Still carried by callers, but intentionally NOT rendered on notifications — + * we show only the Closer app mark, never the partner's photo. Kept for in-app surfaces / future use. + */ val avatarUrl: String? = null )