2021-08-03 07:33:18 +00:00
|
|
|
package com.discord.widgets.emoji;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.res.ColorStateList;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.view.ViewParent;
|
|
|
|
import android.widget.FrameLayout;
|
|
|
|
import android.widget.ImageView;
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
import androidx.fragment.app.FragmentManager;
|
|
|
|
import androidx.fragment.app.FragmentViewModelLazyKt;
|
|
|
|
import androidx.transition.ChangeBounds;
|
|
|
|
import androidx.transition.TransitionManager;
|
2021-08-13 06:23:11 +00:00
|
|
|
import c.a.d.f0;
|
2021-08-11 06:37:47 +00:00
|
|
|
import c.a.d.h0;
|
|
|
|
import c.a.k.b;
|
2021-08-03 07:33:18 +00:00
|
|
|
import c.d.b.a.a;
|
2021-10-15 06:18:26 +00:00
|
|
|
import c0.g;
|
|
|
|
import c0.z.d.a0;
|
|
|
|
import c0.z.d.m;
|
2021-08-09 22:51:56 +00:00
|
|
|
import com.discord.R;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.discord.api.guild.GuildFeature;
|
|
|
|
import com.discord.app.AppBottomSheet;
|
|
|
|
import com.discord.app.AppViewFlipper;
|
|
|
|
import com.discord.databinding.WidgetEmojiSheetBinding;
|
|
|
|
import com.discord.models.domain.emoji.ModelEmojiCustom;
|
|
|
|
import com.discord.models.guild.Guild;
|
|
|
|
import com.discord.stores.StoreNotices;
|
|
|
|
import com.discord.stores.StoreStream;
|
|
|
|
import com.discord.utilities.color.ColorCompat;
|
|
|
|
import com.discord.utilities.dimen.DimenUtils;
|
|
|
|
import com.discord.utilities.drawable.DrawableCompat;
|
|
|
|
import com.discord.utilities.icon.IconUtils;
|
|
|
|
import com.discord.utilities.images.MGImages;
|
|
|
|
import com.discord.utilities.locale.LocaleManager;
|
|
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
|
|
import com.discord.utilities.textprocessing.node.EmojiNode;
|
|
|
|
import com.discord.utilities.view.extensions.ViewExtensions;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
|
2021-08-09 22:51:56 +00:00
|
|
|
import com.discord.widgets.chat.input.MentionUtilsKt;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.discord.widgets.emoji.EmojiSheetViewModel;
|
|
|
|
import com.facebook.drawee.view.SimpleDraweeView;
|
|
|
|
import com.google.android.material.button.MaterialButton;
|
|
|
|
import java.text.NumberFormat;
|
|
|
|
import kotlin.Lazy;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import kotlin.reflect.KProperty;
|
|
|
|
import rx.subscriptions.CompositeSubscription;
|
|
|
|
/* compiled from: WidgetEmojiSheet.kt */
|
|
|
|
public final class WidgetEmojiSheet extends AppBottomSheet {
|
2021-10-09 06:29:02 +00:00
|
|
|
public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.Z(WidgetEmojiSheet.class, "binding", "getBinding()Lcom/discord/databinding/WidgetEmojiSheetBinding;", 0)};
|
2021-08-03 07:33:18 +00:00
|
|
|
public static final Companion Companion = new Companion(null);
|
|
|
|
private static final String EXTRA_EMOJI_ID_AND_TYPE = "EXTRA_EMOJI_ID_AND_TYPE";
|
|
|
|
private static final int FLIPPER_INDEX_CONTENT = 0;
|
|
|
|
private static final int FLIPPER_INDEX_LOADING = 1;
|
|
|
|
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetEmojiSheet$binding$2.INSTANCE, null, 2, null);
|
|
|
|
private final Lazy emojiIdAndType$delegate;
|
|
|
|
private final int emojiSizePx = IconUtils.getMediaProxySize(DimenUtils.dpToPixels(48));
|
|
|
|
private final MGImages.DistinctChangeDetector imageChangeDetector = new MGImages.DistinctChangeDetector();
|
|
|
|
private final Lazy viewModel$delegate;
|
|
|
|
|
|
|
|
/* compiled from: WidgetEmojiSheet.kt */
|
|
|
|
public static final class Companion {
|
|
|
|
private Companion() {
|
|
|
|
}
|
|
|
|
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
this();
|
|
|
|
}
|
|
|
|
|
|
|
|
private final String getNoticeName(EmojiNode.EmojiIdAndType emojiIdAndType) {
|
|
|
|
String str = "Emoji Sheet: " + emojiIdAndType.toString();
|
|
|
|
m.checkNotNullExpressionValue(str, "StringBuilder(\"Emoji She…)\n .toString()");
|
|
|
|
return str;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void enqueueNotice(EmojiNode.EmojiIdAndType emojiIdAndType) {
|
|
|
|
m.checkNotNullParameter(emojiIdAndType, "emojiIdAndType");
|
|
|
|
String noticeName = getNoticeName(emojiIdAndType);
|
|
|
|
StoreStream.Companion.getNotices().requestToShow(new StoreNotices.Notice(noticeName, null, 0, 0, false, null, 0, false, 0, new WidgetEmojiSheet$Companion$enqueueNotice$showEmojiSheetNotice$1(emojiIdAndType, noticeName), 182, null));
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void show(FragmentManager fragmentManager, EmojiNode.EmojiIdAndType emojiIdAndType) {
|
|
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
|
|
|
m.checkNotNullParameter(emojiIdAndType, "emojiIdAndType");
|
|
|
|
WidgetEmojiSheet widgetEmojiSheet = new WidgetEmojiSheet();
|
|
|
|
Bundle bundle = new Bundle();
|
2021-08-09 22:51:56 +00:00
|
|
|
bundle.putSerializable(WidgetEmojiSheet.EXTRA_EMOJI_ID_AND_TYPE, emojiIdAndType);
|
2021-08-03 07:33:18 +00:00
|
|
|
widgetEmojiSheet.setArguments(bundle);
|
|
|
|
widgetEmojiSheet.show(fragmentManager, WidgetEmojiSheet.class.getName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public WidgetEmojiSheet() {
|
|
|
|
super(false, 1, null);
|
|
|
|
WidgetEmojiSheet$viewModel$2 widgetEmojiSheet$viewModel$2 = new WidgetEmojiSheet$viewModel$2(this);
|
2021-08-13 06:23:11 +00:00
|
|
|
f0 f0Var = new f0(this);
|
|
|
|
this.viewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(EmojiSheetViewModel.class), new WidgetEmojiSheet$appViewModels$$inlined$viewModels$1(f0Var), new h0(widgetEmojiSheet$viewModel$2));
|
2021-08-03 07:33:18 +00:00
|
|
|
this.emojiIdAndType$delegate = g.lazy(new WidgetEmojiSheet$emojiIdAndType$2(this));
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ void access$configureCustomEmoji(WidgetEmojiSheet widgetEmojiSheet, EmojiSheetViewModel.ViewState.EmojiCustom emojiCustom) {
|
|
|
|
widgetEmojiSheet.configureCustomEmoji(emojiCustom);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ void access$configureUnicodeEmoji(WidgetEmojiSheet widgetEmojiSheet, EmojiSheetViewModel.ViewState.EmojiUnicode emojiUnicode) {
|
|
|
|
widgetEmojiSheet.configureUnicodeEmoji(emojiUnicode);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ Bundle access$getArgumentsOrDefault$p(WidgetEmojiSheet widgetEmojiSheet) {
|
|
|
|
return widgetEmojiSheet.getArgumentsOrDefault();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ EmojiNode.EmojiIdAndType access$getEmojiIdAndType$p(WidgetEmojiSheet widgetEmojiSheet) {
|
|
|
|
return widgetEmojiSheet.getEmojiIdAndType();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ EmojiSheetViewModel access$getViewModel$p(WidgetEmojiSheet widgetEmojiSheet) {
|
|
|
|
return widgetEmojiSheet.getViewModel();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ void access$showLoading(WidgetEmojiSheet widgetEmojiSheet) {
|
|
|
|
widgetEmojiSheet.showLoading();
|
|
|
|
}
|
|
|
|
|
|
|
|
private final void configureButtons(boolean z2, boolean z3, Guild guild) {
|
|
|
|
WidgetEmojiSheetBinding binding = getBinding();
|
|
|
|
if (guild == null) {
|
|
|
|
FrameLayout frameLayout = binding.b;
|
|
|
|
m.checkNotNullExpressionValue(frameLayout, "buttonContainer");
|
|
|
|
frameLayout.setVisibility(8);
|
|
|
|
} else if (!z2) {
|
|
|
|
FrameLayout frameLayout2 = binding.b;
|
|
|
|
m.checkNotNullExpressionValue(frameLayout2, "buttonContainer");
|
|
|
|
frameLayout2.setVisibility(0);
|
|
|
|
MaterialButton materialButton = binding.q;
|
|
|
|
m.checkNotNullExpressionValue(materialButton, "premiumBtn");
|
|
|
|
materialButton.setVisibility(0);
|
|
|
|
MaterialButton materialButton2 = binding.o;
|
|
|
|
m.checkNotNullExpressionValue(materialButton2, "joinBtn");
|
|
|
|
materialButton2.setVisibility(8);
|
|
|
|
binding.q.setOnClickListener(new WidgetEmojiSheet$configureButtons$$inlined$with$lambda$1(this, guild, z2, z3));
|
|
|
|
} else if (!z3) {
|
|
|
|
FrameLayout frameLayout3 = binding.b;
|
|
|
|
m.checkNotNullExpressionValue(frameLayout3, "buttonContainer");
|
|
|
|
frameLayout3.setVisibility(0);
|
|
|
|
MaterialButton materialButton3 = binding.q;
|
|
|
|
m.checkNotNullExpressionValue(materialButton3, "premiumBtn");
|
|
|
|
materialButton3.setVisibility(8);
|
|
|
|
MaterialButton materialButton4 = binding.o;
|
|
|
|
m.checkNotNullExpressionValue(materialButton4, "joinBtn");
|
|
|
|
materialButton4.setVisibility(0);
|
|
|
|
binding.o.setOnClickListener(new WidgetEmojiSheet$configureButtons$$inlined$with$lambda$2(this, guild, z2, z3));
|
|
|
|
} else {
|
|
|
|
FrameLayout frameLayout4 = binding.b;
|
|
|
|
m.checkNotNullExpressionValue(frameLayout4, "buttonContainer");
|
|
|
|
frameLayout4.setVisibility(8);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private final void configureCustomEmoji(EmojiSheetViewModel.ViewState.EmojiCustom emojiCustom) {
|
|
|
|
WidgetEmojiSheetBinding binding = getBinding();
|
|
|
|
m.checkNotNullExpressionValue(binding, "binding");
|
|
|
|
AppViewFlipper appViewFlipper = binding.a;
|
|
|
|
m.checkNotNullExpressionValue(appViewFlipper, "binding.root");
|
|
|
|
ViewParent parent = appViewFlipper.getParent();
|
|
|
|
Integer num = null;
|
|
|
|
if (!(parent instanceof ViewGroup)) {
|
|
|
|
parent = null;
|
|
|
|
}
|
|
|
|
ViewGroup viewGroup = (ViewGroup) parent;
|
|
|
|
if (viewGroup != null) {
|
|
|
|
ChangeBounds changeBounds = new ChangeBounds();
|
|
|
|
changeBounds.setDuration(150);
|
|
|
|
TransitionManager.beginDelayedTransition(viewGroup, changeBounds);
|
|
|
|
}
|
|
|
|
EmojiSheetViewModel.Companion.CustomEmojGuildInfo emojiGuildInfo = emojiCustom.getEmojiGuildInfo();
|
|
|
|
if (!(emojiGuildInfo instanceof EmojiSheetViewModel.Companion.CustomEmojGuildInfo.Known)) {
|
|
|
|
emojiGuildInfo = null;
|
|
|
|
}
|
|
|
|
EmojiSheetViewModel.Companion.CustomEmojGuildInfo.Known known = (EmojiSheetViewModel.Companion.CustomEmojGuildInfo.Known) emojiGuildInfo;
|
|
|
|
boolean isPublic = emojiCustom.getEmojiGuildInfo().isPublic();
|
|
|
|
boolean isUserInGuild = emojiCustom.getEmojiGuildInfo().isUserInGuild();
|
|
|
|
EmojiNode.EmojiIdAndType.Custom emojiCustom2 = emojiCustom.getEmojiCustom();
|
|
|
|
boolean isUserPremium = emojiCustom.isUserPremium();
|
|
|
|
boolean isCurrentGuild = emojiCustom.isCurrentGuild();
|
|
|
|
WidgetEmojiSheetBinding binding2 = getBinding();
|
|
|
|
SimpleDraweeView simpleDraweeView = binding2.d;
|
|
|
|
m.checkNotNullExpressionValue(simpleDraweeView, "emojiIv");
|
|
|
|
MGImages.setImage$default(simpleDraweeView, ModelEmojiCustom.getImageUri(emojiCustom2.getId(), emojiCustom2.isAnimated(), this.emojiSizePx), 0, 0, false, null, this.imageChangeDetector, 60, null);
|
|
|
|
TextView textView = binding2.p;
|
|
|
|
m.checkNotNullExpressionValue(textView, "nameTv");
|
2021-08-09 22:51:56 +00:00
|
|
|
textView.setText(MentionUtilsKt.EMOJIS_AND_STICKERS_CHAR + emojiCustom2.getName() + MentionUtilsKt.EMOJIS_AND_STICKERS_CHAR);
|
2021-10-22 21:32:49 +00:00
|
|
|
TextView textView2 = binding2.f2227c;
|
2021-08-03 07:33:18 +00:00
|
|
|
m.checkNotNullExpressionValue(textView2, "emojiInfoTv");
|
|
|
|
textView2.setText(getString(getCustomEmojiInfoText(isCurrentGuild, isUserInGuild, isPublic, isUserPremium)));
|
|
|
|
configureButtons(isUserPremium, isUserInGuild, known != null ? known.getGuild() : null);
|
|
|
|
Guild guild = known != null ? known.getGuild() : null;
|
|
|
|
if (known != null) {
|
|
|
|
num = known.getApproximateOnline();
|
|
|
|
}
|
|
|
|
configureGuildSection(guild, isCurrentGuild, isPublic, num);
|
|
|
|
configureFavorite(emojiCustom.getCanFavorite(), emojiCustom.isFavorite());
|
|
|
|
AppViewFlipper appViewFlipper2 = getBinding().e;
|
|
|
|
m.checkNotNullExpressionValue(appViewFlipper2, "binding.emojiSheetFlipper");
|
|
|
|
appViewFlipper2.setDisplayedChild(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
private final void configureFavorite(boolean z2, boolean z3) {
|
|
|
|
FrameLayout frameLayout = getBinding().g;
|
|
|
|
m.checkNotNullExpressionValue(frameLayout, "binding.favoriteContainer");
|
|
|
|
frameLayout.setVisibility(z2 ? 0 : 8);
|
|
|
|
MaterialButton materialButton = getBinding().f;
|
|
|
|
ViewExtensions.fadeBy(materialButton, !z3, 200);
|
|
|
|
materialButton.setOnClickListener(new WidgetEmojiSheet$configureFavorite$$inlined$apply$lambda$1(this, z3));
|
|
|
|
MaterialButton materialButton2 = getBinding().h;
|
|
|
|
ViewExtensions.fadeBy(materialButton2, z3, 200);
|
|
|
|
materialButton2.setOnClickListener(new WidgetEmojiSheet$configureFavorite$$inlined$apply$lambda$2(this, z3));
|
|
|
|
}
|
|
|
|
|
|
|
|
private final void configureGuildSection(Guild guild, boolean z2, boolean z3, Integer num) {
|
|
|
|
WidgetEmojiSheetBinding binding = getBinding();
|
|
|
|
if (guild == null || z2) {
|
|
|
|
LinearLayout linearLayout = binding.k;
|
|
|
|
m.checkNotNullExpressionValue(linearLayout, "guildContainer");
|
|
|
|
linearLayout.setVisibility(8);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
LinearLayout linearLayout2 = binding.k;
|
|
|
|
m.checkNotNullExpressionValue(linearLayout2, "guildContainer");
|
|
|
|
linearLayout2.setVisibility(0);
|
|
|
|
if (guild.hasIcon()) {
|
|
|
|
SimpleDraweeView simpleDraweeView = binding.m;
|
|
|
|
m.checkNotNullExpressionValue(simpleDraweeView, "guildIv");
|
|
|
|
IconUtils.setIcon$default((ImageView) simpleDraweeView, guild, 0, (MGImages.ChangeDetector) this.imageChangeDetector, true, 4, (Object) null);
|
|
|
|
} else {
|
2021-08-09 22:51:56 +00:00
|
|
|
binding.j.setBackgroundResource(R.drawable.drawable_circle_black);
|
|
|
|
int themedColor = ColorCompat.getThemedColor(requireContext(), (int) R.attr.colorBackgroundSecondary);
|
2021-08-03 07:33:18 +00:00
|
|
|
FrameLayout frameLayout = binding.j;
|
|
|
|
m.checkNotNullExpressionValue(frameLayout, "guildAvatarWrap");
|
|
|
|
frameLayout.setBackgroundTintList(ColorStateList.valueOf(themedColor));
|
|
|
|
TextView textView = binding.i;
|
|
|
|
m.checkNotNullExpressionValue(textView, "guildAvatarText");
|
|
|
|
textView.setText(guild.getShortName());
|
|
|
|
}
|
2021-08-09 22:51:56 +00:00
|
|
|
int i = guild.getFeatures().contains(GuildFeature.PARTNERED) ? R.drawable.ic_partnered_badge_banner : guild.getFeatures().contains(GuildFeature.VERIFIED) ? R.drawable.ic_verified_badge_banner : 0;
|
2021-08-03 07:33:18 +00:00
|
|
|
TextView textView2 = binding.n;
|
|
|
|
m.checkNotNullExpressionValue(textView2, "guildNameTv");
|
|
|
|
DrawableCompat.setCompoundDrawablesCompat(textView2, i, 0, 0, 0);
|
|
|
|
TextView textView3 = binding.n;
|
|
|
|
m.checkNotNullExpressionValue(textView3, "guildNameTv");
|
|
|
|
textView3.setText(guild.getName());
|
2021-08-09 22:51:56 +00:00
|
|
|
int i2 = z3 ? R.string.emoji_popout_public_server : R.string.emoji_popout_private_server;
|
2021-08-03 07:33:18 +00:00
|
|
|
String str = null;
|
|
|
|
CharSequence k = b.k(this, i2, new Object[0], null, 4);
|
|
|
|
if (num != null) {
|
|
|
|
String format = NumberFormat.getNumberInstance(new LocaleManager().getPrimaryLocale(requireContext())).format(Integer.valueOf(num.intValue()));
|
2021-08-09 22:51:56 +00:00
|
|
|
str = b.k(this, R.string.instant_invite_guild_members_online, new Object[]{format}, null, 4).toString() + " • ";
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
if (str == null) {
|
|
|
|
str = "";
|
|
|
|
}
|
|
|
|
TextView textView4 = binding.l;
|
|
|
|
m.checkNotNullExpressionValue(textView4, "guildInfoTv");
|
|
|
|
textView4.setText(str + k);
|
|
|
|
}
|
|
|
|
|
|
|
|
private final void configureUnicodeEmoji(EmojiSheetViewModel.ViewState.EmojiUnicode emojiUnicode) {
|
|
|
|
WidgetEmojiSheetBinding binding = getBinding();
|
|
|
|
SimpleDraweeView simpleDraweeView = binding.d;
|
|
|
|
m.checkNotNullExpressionValue(simpleDraweeView, "emojiIv");
|
|
|
|
MGImages.setImage$default(simpleDraweeView, emojiUnicode.getEmojiUnicode().getImageUri(true, this.emojiSizePx, requireContext()), 0, 0, false, null, this.imageChangeDetector, 60, null);
|
|
|
|
TextView textView = binding.p;
|
|
|
|
m.checkNotNullExpressionValue(textView, "nameTv");
|
2021-08-09 22:51:56 +00:00
|
|
|
textView.setText(MentionUtilsKt.EMOJIS_AND_STICKERS_CHAR + emojiUnicode.getEmojiUnicode().getFirstName() + MentionUtilsKt.EMOJIS_AND_STICKERS_CHAR);
|
2021-10-22 21:32:49 +00:00
|
|
|
TextView textView2 = binding.f2227c;
|
2021-08-03 07:33:18 +00:00
|
|
|
m.checkNotNullExpressionValue(textView2, "emojiInfoTv");
|
2021-08-09 22:51:56 +00:00
|
|
|
textView2.setText(getString(R.string.emoji_popout_standard_emoji_description));
|
2021-08-03 07:33:18 +00:00
|
|
|
FrameLayout frameLayout = binding.b;
|
|
|
|
m.checkNotNullExpressionValue(frameLayout, "buttonContainer");
|
|
|
|
frameLayout.setVisibility(8);
|
|
|
|
LinearLayout linearLayout = binding.k;
|
|
|
|
m.checkNotNullExpressionValue(linearLayout, "guildContainer");
|
|
|
|
linearLayout.setVisibility(8);
|
|
|
|
configureFavorite(emojiUnicode.getCanFavorite(), emojiUnicode.isFavorite());
|
|
|
|
AppViewFlipper appViewFlipper = getBinding().e;
|
|
|
|
m.checkNotNullExpressionValue(appViewFlipper, "binding.emojiSheetFlipper");
|
|
|
|
appViewFlipper.setDisplayedChild(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
private final WidgetEmojiSheetBinding getBinding() {
|
|
|
|
return (WidgetEmojiSheetBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
private final int getCustomEmojiInfoText(boolean z2, boolean z3, boolean z4, boolean z5) {
|
2021-08-09 22:51:56 +00:00
|
|
|
return (!z2 || z5) ? (!z2 || !z5) ? (!z3 || z5) ? (!z3 || !z5) ? (!z4 || z5) ? (!z4 || !z5) ? R.string.emoji_popout_premium_unjoined_private_guild_description : R.string.emoji_popout_premium_unjoined_discoverable_guild_description : R.string.emoji_popout_unjoined_discoverable_guild_description : R.string.emoji_popout_premium_joined_guild_description : R.string.emoji_popout_joined_guild_description : R.string.emoji_popout_premium_current_guild_description : R.string.emoji_popout_current_guild_description;
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private final EmojiNode.EmojiIdAndType getEmojiIdAndType() {
|
|
|
|
return (EmojiNode.EmojiIdAndType) this.emojiIdAndType$delegate.getValue();
|
|
|
|
}
|
|
|
|
|
|
|
|
private final EmojiSheetViewModel getViewModel() {
|
|
|
|
return (EmojiSheetViewModel) this.viewModel$delegate.getValue();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final void show(FragmentManager fragmentManager, EmojiNode.EmojiIdAndType emojiIdAndType) {
|
|
|
|
Companion.show(fragmentManager, emojiIdAndType);
|
|
|
|
}
|
|
|
|
|
|
|
|
private final void showLoading() {
|
|
|
|
AppViewFlipper appViewFlipper = getBinding().e;
|
|
|
|
m.checkNotNullExpressionValue(appViewFlipper, "binding.emojiSheetFlipper");
|
|
|
|
appViewFlipper.setDisplayedChild(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppBottomSheet
|
|
|
|
public void bindSubscriptions(CompositeSubscription compositeSubscription) {
|
|
|
|
m.checkNotNullParameter(compositeSubscription, "compositeSubscription");
|
2021-08-27 06:37:59 +00:00
|
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(getViewModel().observeViewState(), this, null, 2, null), WidgetEmojiSheet.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetEmojiSheet$bindSubscriptions$1(this), 62, (Object) null);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppBottomSheet
|
|
|
|
public int getContentViewResId() {
|
2021-08-09 22:51:56 +00:00
|
|
|
return R.layout.widget_emoji_sheet;
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|