44 lines
1.8 KiB
Java
44 lines
1.8 KiB
Java
package com.discord.widgets.settings.premium;
|
|
|
|
import android.content.ClipData;
|
|
import android.content.ClipboardManager;
|
|
import android.content.Context;
|
|
import com.discord.utilities.gifting.GiftingUtils;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetSettingsGifting.kt */
|
|
public final class WidgetSettingsGifting$configureUI$2 extends o implements Function1<String, Unit> {
|
|
public final /* synthetic */ WidgetSettingsGifting this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetSettingsGifting$configureUI$2(WidgetSettingsGifting widgetSettingsGifting) {
|
|
super(1);
|
|
this.this$0 = widgetSettingsGifting;
|
|
}
|
|
|
|
/* 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(String str) {
|
|
invoke(str);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(String str) {
|
|
m.checkNotNullParameter(str, "giftCode");
|
|
Context context = this.this$0.getContext();
|
|
ClipboardManager clipboardManager = null;
|
|
Object systemService = context != null ? context.getSystemService("clipboard") : null;
|
|
if (systemService instanceof ClipboardManager) {
|
|
clipboardManager = systemService;
|
|
}
|
|
ClipboardManager clipboardManager2 = clipboardManager;
|
|
if (clipboardManager2 != null) {
|
|
clipboardManager2.setPrimaryClip(ClipData.newPlainText("", GiftingUtils.INSTANCE.generateGiftUrl(str)));
|
|
}
|
|
WidgetSettingsGifting.access$getViewModel$p(this.this$0).handleCopyClicked(str);
|
|
}
|
|
}
|