53 lines
2.1 KiB
Java
53 lines
2.1 KiB
Java
package com.discord.utilities.notices;
|
|
|
|
import android.view.View;
|
|
import c.d.b.a.a;
|
|
import com.discord.app.AppLog;
|
|
import com.discord.stores.StoreNotices;
|
|
import com.discord.stores.StoreStream;
|
|
import com.discord.utilities.logging.Logger;
|
|
import com.discord.widgets.settings.connections.WidgetSettingsUserConnections;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: NoticeBuilders.kt */
|
|
public final class NoticeBuilders$deleteConnectionModalBuilder$2 extends o implements Function1<View, Unit> {
|
|
public final /* synthetic */ StoreNotices.Dialog $notice;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public NoticeBuilders$deleteConnectionModalBuilder$2(StoreNotices.Dialog dialog) {
|
|
super(1);
|
|
this.$notice = dialog;
|
|
}
|
|
|
|
/* 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(View view) {
|
|
invoke(view);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(View view) {
|
|
m.checkNotNullParameter(view, "it");
|
|
if (this.$notice.getMetadata() != null) {
|
|
Object obj = this.$notice.getMetadata().get(WidgetSettingsUserConnections.PLATFORM_NAME);
|
|
String str = null;
|
|
if (!(obj instanceof String)) {
|
|
obj = null;
|
|
}
|
|
String str2 = (String) obj;
|
|
Object obj2 = this.$notice.getMetadata().get(WidgetSettingsUserConnections.CONNECTION_ID);
|
|
if (obj2 instanceof String) {
|
|
str = obj2;
|
|
}
|
|
String str3 = str;
|
|
if (str2 == null || str3 == null) {
|
|
Logger.e$default(AppLog.g, "Delete Connections", new Exception(a.t(str2, ", ", str3)), null, 4, null);
|
|
} else {
|
|
StoreStream.Companion.getUserConnections().deleteUserConnection(str2, str3);
|
|
}
|
|
}
|
|
}
|
|
}
|