62 lines
3.2 KiB
Java
62 lines
3.2 KiB
Java
package com.discord.widgets.channels;
|
|
|
|
import android.content.Context;
|
|
import android.view.MenuItem;
|
|
import android.view.View;
|
|
import androidx.fragment.app.FragmentManager;
|
|
import c.a.k.b;
|
|
import com.discord.R;
|
|
import com.discord.widgets.notice.WidgetNoticeDialog;
|
|
import d0.t.g0;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetChannelTopic.kt */
|
|
public final class WidgetChannelTopic$showContextMenu$4 implements MenuItem.OnMenuItemClickListener {
|
|
public final /* synthetic */ CharSequence $channelTitle;
|
|
public final /* synthetic */ WidgetChannelTopic this$0;
|
|
|
|
/* compiled from: WidgetChannelTopic.kt */
|
|
/* renamed from: com.discord.widgets.channels.WidgetChannelTopic$showContextMenu$4$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 extends o implements Function1<View, Unit> {
|
|
public final /* synthetic */ WidgetChannelTopic$showContextMenu$4 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(WidgetChannelTopic$showContextMenu$4 widgetChannelTopic$showContextMenu$4) {
|
|
super(1);
|
|
this.this$0 = widgetChannelTopic$showContextMenu$4;
|
|
}
|
|
|
|
/* 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, "v");
|
|
WidgetChannelTopicViewModel access$getViewModel$p = WidgetChannelTopic.access$getViewModel$p(this.this$0.this$0);
|
|
Context context = view.getContext();
|
|
m.checkNotNullExpressionValue(context, "v.context");
|
|
access$getViewModel$p.handleClosePrivateChannel(context);
|
|
}
|
|
}
|
|
|
|
public WidgetChannelTopic$showContextMenu$4(WidgetChannelTopic widgetChannelTopic, CharSequence charSequence) {
|
|
this.this$0 = widgetChannelTopic;
|
|
this.$channelTitle = charSequence;
|
|
}
|
|
|
|
@Override // android.view.MenuItem.OnMenuItemClickListener
|
|
public final boolean onMenuItemClick(MenuItem menuItem) {
|
|
WidgetNoticeDialog.Companion companion = WidgetNoticeDialog.Companion;
|
|
FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager();
|
|
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
|
|
WidgetNoticeDialog.Companion.show$default(companion, parentFragmentManager, b.k(this.this$0, R.string.leave_group_dm_title, new Object[]{this.$channelTitle}, null, 4), b.k(this.this$0, R.string.leave_group_dm_body, new Object[]{this.$channelTitle}, null, 4), b.k(this.this$0, R.string.leave_group_dm, new Object[0], null, 4), b.k(this.this$0, R.string.cancel, new Object[0], null, 4), g0.mapOf(d0.o.to(Integer.valueOf((int) R.id.notice_ok), new AnonymousClass1(this))), null, null, null, Integer.valueOf((int) R.attr.notice_theme_positive_red), null, null, 0, null, 15808, null);
|
|
return true;
|
|
}
|
|
}
|