2021-08-03 07:33:18 +00:00
|
|
|
package com.discord.utilities.fcm;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.graphics.Bitmap;
|
|
|
|
import androidx.core.app.NotificationCompat;
|
2021-09-15 06:33:54 +00:00
|
|
|
import androidx.core.graphics.drawable.IconCompat;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.discord.utilities.fcm.NotificationData;
|
|
|
|
import com.discord.utilities.images.MGImagesBitmap;
|
2021-11-02 06:38:17 +00:00
|
|
|
import d0.y.b;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import d0.z.d.o;
|
2021-08-03 07:33:18 +00:00
|
|
|
import java.util.List;
|
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
/* compiled from: NotificationRenderer.kt */
|
|
|
|
public final class NotificationRenderer$displayAndUpdateCache$7 extends o implements Function1<MGImagesBitmap.CloseableBitmaps, Unit> {
|
|
|
|
public final /* synthetic */ Context $context;
|
|
|
|
public final /* synthetic */ NotificationData.DisplayPayload $displayPayload;
|
|
|
|
public final /* synthetic */ List $displayPayloadExtras;
|
|
|
|
public final /* synthetic */ NotificationData $notification;
|
|
|
|
public final /* synthetic */ NotificationCompat.Builder $notificationBuilder;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public NotificationRenderer$displayAndUpdateCache$7(NotificationData notificationData, NotificationCompat.Builder builder, List list, Context context, NotificationData.DisplayPayload displayPayload) {
|
|
|
|
super(1);
|
|
|
|
this.$notification = notificationData;
|
|
|
|
this.$notificationBuilder = builder;
|
|
|
|
this.$displayPayloadExtras = list;
|
|
|
|
this.$context = context;
|
|
|
|
this.$displayPayload = displayPayload;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
|
|
|
public /* bridge */ /* synthetic */ Unit invoke(MGImagesBitmap.CloseableBitmaps closeableBitmaps) {
|
|
|
|
invoke(closeableBitmaps);
|
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
|
2021-09-15 06:33:54 +00:00
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:17:0x0065, code lost:
|
2021-08-03 07:33:18 +00:00
|
|
|
r1 = move-exception;
|
|
|
|
*/
|
2021-09-15 06:33:54 +00:00
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:18:0x0066, code lost:
|
2021-11-02 06:38:17 +00:00
|
|
|
d0.y.b.closeFinally(r9, r0);
|
2021-08-03 07:33:18 +00:00
|
|
|
*/
|
2021-09-15 06:33:54 +00:00
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:19:0x0069, code lost:
|
2021-08-03 07:33:18 +00:00
|
|
|
throw r1;
|
|
|
|
*/
|
|
|
|
public final void invoke(MGImagesBitmap.CloseableBitmaps closeableBitmaps) {
|
|
|
|
Bitmap bitmap = (Bitmap) closeableBitmaps.get((Object) this.$notification.getIconUrl());
|
|
|
|
if (bitmap != null) {
|
|
|
|
this.$notificationBuilder.setLargeIcon(bitmap);
|
|
|
|
}
|
|
|
|
if (!this.$displayPayloadExtras.isEmpty()) {
|
|
|
|
this.$notificationBuilder.setNumber(this.$displayPayloadExtras.size());
|
|
|
|
NotificationCompat.Builder builder = this.$notificationBuilder;
|
|
|
|
NotificationRenderer notificationRenderer = NotificationRenderer.INSTANCE;
|
|
|
|
Context context = this.$context;
|
|
|
|
NotificationData notificationData = this.$notification;
|
|
|
|
List list = this.$displayPayloadExtras;
|
|
|
|
m.checkNotNullExpressionValue(closeableBitmaps, "bitmapsForIconUris");
|
|
|
|
builder.setStyle(NotificationRenderer.access$getMessageStyle(notificationRenderer, context, notificationData, list, closeableBitmaps));
|
2021-09-15 06:33:54 +00:00
|
|
|
NotificationRenderer.access$pushShortcut(notificationRenderer, this.$context, this.$notification, this.$notificationBuilder, bitmap != null ? IconCompat.createWithBitmap(bitmap) : null);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
2021-09-15 06:33:54 +00:00
|
|
|
NotificationRenderer.access$displayNotification(NotificationRenderer.INSTANCE, this.$context, this.$displayPayload.getId(), this.$notificationBuilder);
|
2021-08-03 07:33:18 +00:00
|
|
|
b.closeFinally(closeableBitmaps, null);
|
|
|
|
}
|
|
|
|
}
|