53 lines
3.3 KiB
Java
53 lines
3.3 KiB
Java
package com.discord.widgets.chat.list.actions;
|
|
|
|
import android.content.Context;
|
|
import androidx.fragment.app.FragmentManager;
|
|
import com.discord.app.AppComponent;
|
|
import com.discord.models.message.Message;
|
|
import com.discord.widgets.chat.list.PublishActionDialog;
|
|
import com.discord.widgets.notice.WidgetNoticeDialog;
|
|
import d0.o;
|
|
import d0.t.g0;
|
|
import d0.z.d.m;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
/* compiled from: MessageActionDialogs.kt */
|
|
public final class MessageActionDialogs {
|
|
public static final MessageActionDialogs INSTANCE = new MessageActionDialogs();
|
|
|
|
private MessageActionDialogs() {
|
|
}
|
|
|
|
public final void showDeleteMessageConfirmation(FragmentManager fragmentManager, Context context, Message message, Function0<Unit> function0) {
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
|
m.checkNotNullParameter(context, "context");
|
|
m.checkNotNullParameter(message, "message");
|
|
m.checkNotNullParameter(function0, "onSuccess");
|
|
WidgetNoticeDialog.Companion companion = WidgetNoticeDialog.Companion;
|
|
String string = context.getString(2131888062);
|
|
String string2 = context.getString(2131888063);
|
|
m.checkNotNullExpressionValue(string2, "context.getString(R.string.delete_message_body)");
|
|
WidgetNoticeDialog.Companion.show$default(companion, fragmentManager, string, string2, context.getString(2131888051), context.getString(2131887178), g0.mapOf(o.to(2131364075, new MessageActionDialogs$showDeleteMessageConfirmation$1(message, function0))), null, null, null, 2130969788, null, null, 0, null, 15808, null);
|
|
}
|
|
|
|
public final void showPinMessageConfirmation(FragmentManager fragmentManager, Context context, Message message, AppComponent appComponent, Function0<Unit> function0) {
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
|
m.checkNotNullParameter(context, "context");
|
|
m.checkNotNullParameter(message, "message");
|
|
m.checkNotNullParameter(appComponent, "appComponent");
|
|
m.checkNotNullParameter(function0, "onSuccess");
|
|
boolean areEqual = m.areEqual(message.getPinned(), Boolean.TRUE);
|
|
WidgetNoticeDialog.Companion companion = WidgetNoticeDialog.Companion;
|
|
String string = context.getString(areEqual ? 2131894178 : 2131891961);
|
|
String string2 = context.getString(areEqual ? 2131894174 : 2131891959);
|
|
m.checkNotNullExpressionValue(string2, "context.getString(\n …age_body_mobile\n )");
|
|
WidgetNoticeDialog.Companion.show$default(companion, fragmentManager, string, string2, context.getString(areEqual ? 2131894171 : 2131891955), context.getString(2131887178), g0.mapOf(o.to(2131364075, new MessageActionDialogs$showPinMessageConfirmation$1(message, areEqual, appComponent, context, function0))), null, null, null, null, null, null, 0, null, 16320, null);
|
|
}
|
|
|
|
public final void showPublishMessageConfirmation(FragmentManager fragmentManager, Message message, Function0<Unit> function0) {
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
|
m.checkNotNullParameter(message, "message");
|
|
m.checkNotNullParameter(function0, "onSuccess");
|
|
PublishActionDialog.Companion.show$default(PublishActionDialog.Companion, fragmentManager, message.getId(), message.getChannelId(), function0, null, 16, null);
|
|
}
|
|
}
|