2021-08-03 07:33:18 +00:00
|
|
|
package com.discord.widgets.guilds.invite;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.content.res.Resources;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.widget.FrameLayout;
|
|
|
|
import android.widget.ImageButton;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.activity.result.ActivityResultLauncher;
|
|
|
|
import androidx.cardview.widget.CardView;
|
|
|
|
import androidx.core.view.ViewCompat;
|
|
|
|
import androidx.core.widget.NestedScrollView;
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
import androidx.fragment.app.FragmentManager;
|
|
|
|
import androidx.fragment.app.FragmentViewModelLazyKt;
|
|
|
|
import androidx.recyclerview.widget.RecyclerView;
|
2021-12-17 21:59:34 +00:00
|
|
|
import b.a.d.f0;
|
|
|
|
import b.a.d.h0;
|
|
|
|
import b.a.k.b;
|
|
|
|
import b.d.b.a.a;
|
2021-08-09 22:51:56 +00:00
|
|
|
import com.discord.R;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.discord.api.channel.Channel;
|
2021-10-08 22:11:56 +00:00
|
|
|
import com.discord.api.channel.ChannelUtils;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.discord.app.AppBottomSheet;
|
|
|
|
import com.discord.app.AppViewFlipper;
|
2021-09-30 06:24:59 +00:00
|
|
|
import com.discord.app.LoggingConfig;
|
2021-08-03 07:33:18 +00:00
|
|
|
import com.discord.databinding.WidgetGuildInviteShareSheetBinding;
|
|
|
|
import com.discord.models.domain.ModelInvite;
|
|
|
|
import com.discord.stores.StoreNotices;
|
|
|
|
import com.discord.stores.StoreStream;
|
|
|
|
import com.discord.utilities.analytics.AnalyticsTracker;
|
|
|
|
import com.discord.utilities.mg_recycler.MGRecyclerAdapter;
|
|
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
|
|
import com.discord.utilities.time.ClockFactory;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
|
|
|
|
import com.discord.views.SearchInputView;
|
|
|
|
import com.discord.widgets.guilds.invite.GuildInviteShareSheetViewModel;
|
|
|
|
import com.discord.widgets.home.WidgetHome;
|
2021-11-02 06:38:17 +00:00
|
|
|
import d0.g0.t;
|
|
|
|
import d0.z.d.a0;
|
|
|
|
import d0.z.d.m;
|
2021-08-03 07:33:18 +00:00
|
|
|
import java.util.Objects;
|
|
|
|
import kotlin.Lazy;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import kotlin.reflect.KProperty;
|
|
|
|
/* compiled from: WidgetGuildInviteShareSheet.kt */
|
|
|
|
public final class WidgetGuildInviteShareSheet extends AppBottomSheet {
|
2021-11-05 06:48:17 +00:00
|
|
|
public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.b0(WidgetGuildInviteShareSheet.class, "binding", "getBinding()Lcom/discord/databinding/WidgetGuildInviteShareSheetBinding;", 0)};
|
2021-08-03 07:33:18 +00:00
|
|
|
private static final String ARG_ANALYTICS_SOURCE = "ARG_ANALYTICS_SOURCE";
|
|
|
|
private static final String ARG_CHANNEL_ID = "ARG_CHANNEL_ID";
|
|
|
|
private static final String ARG_GUILD_ID = "ARG_GUILD_ID";
|
|
|
|
public static final Companion Companion = new Companion(null);
|
|
|
|
private InviteSuggestionsAdapter adapter;
|
|
|
|
private String analyticsSource;
|
|
|
|
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetGuildInviteShareSheet$binding$2.INSTANCE, null, 2, null);
|
|
|
|
private final ActivityResultLauncher<Intent> guildInviteSettingsLauncher;
|
|
|
|
private boolean isFixedHeight;
|
2021-09-30 06:24:59 +00:00
|
|
|
private final LoggingConfig loggingConfig;
|
2021-08-03 07:33:18 +00:00
|
|
|
private boolean restoredSearchQueryFromViewModel;
|
|
|
|
private final Lazy viewModel$delegate;
|
|
|
|
|
|
|
|
/* compiled from: WidgetGuildInviteShareSheet.kt */
|
|
|
|
public static final class Companion {
|
|
|
|
private Companion() {
|
|
|
|
}
|
|
|
|
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
this();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static /* synthetic */ void enqueueNoticeForHomeTab$default(Companion companion, Long l, long j, String str, int i, Object obj) {
|
|
|
|
if ((i & 1) != 0) {
|
|
|
|
l = null;
|
|
|
|
}
|
|
|
|
companion.enqueueNoticeForHomeTab(l, j, str);
|
|
|
|
}
|
|
|
|
|
|
|
|
private final String getNoticeName() {
|
|
|
|
return WidgetGuildInviteShareSheet.class.getSimpleName() + " - " + ClockFactory.get().currentTimeMillis();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static /* synthetic */ void show$default(Companion companion, FragmentManager fragmentManager, Long l, long j, String str, int i, Object obj) {
|
|
|
|
if ((i & 2) != 0) {
|
|
|
|
l = null;
|
|
|
|
}
|
|
|
|
companion.show(fragmentManager, l, j, str);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void enqueueNoticeForHomeTab(Long l, long j, String str) {
|
|
|
|
m.checkNotNullParameter(str, "source");
|
|
|
|
StoreNotices notices = StoreStream.Companion.getNotices();
|
2021-11-02 06:38:17 +00:00
|
|
|
notices.requestToShow(new StoreNotices.Notice(getNoticeName(), null, ClockFactory.get().currentTimeMillis(), 0, false, d0.t.m.listOf(a0.getOrCreateKotlinClass(WidgetHome.class)), 0, false, 0, new WidgetGuildInviteShareSheet$Companion$enqueueNoticeForHomeTab$notice$1(l, j, str, notices, getNoticeName()), 146, null));
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public final void show(FragmentManager fragmentManager, Long l, long j, String str) {
|
|
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
|
|
|
m.checkNotNullParameter(str, "source");
|
|
|
|
AnalyticsTracker.INSTANCE.openPopout("Instant Invite", str);
|
|
|
|
WidgetGuildInviteShareSheet widgetGuildInviteShareSheet = new WidgetGuildInviteShareSheet();
|
|
|
|
Bundle bundle = new Bundle();
|
|
|
|
if (l != null) {
|
2021-08-09 22:51:56 +00:00
|
|
|
bundle.putLong(WidgetGuildInviteShareSheet.ARG_CHANNEL_ID, l.longValue());
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
2021-08-09 22:51:56 +00:00
|
|
|
bundle.putLong(WidgetGuildInviteShareSheet.ARG_GUILD_ID, j);
|
|
|
|
bundle.putString(WidgetGuildInviteShareSheet.ARG_ANALYTICS_SOURCE, str);
|
2021-08-03 07:33:18 +00:00
|
|
|
widgetGuildInviteShareSheet.setArguments(bundle);
|
|
|
|
widgetGuildInviteShareSheet.show(fragmentManager, WidgetGuildInviteShareSheet.class.getName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public WidgetGuildInviteShareSheet() {
|
|
|
|
super(false, 1, null);
|
|
|
|
WidgetGuildInviteShareSheet$viewModel$2 widgetGuildInviteShareSheet$viewModel$2 = new WidgetGuildInviteShareSheet$viewModel$2(this);
|
2021-08-13 06:23:11 +00:00
|
|
|
f0 f0Var = new f0(this);
|
|
|
|
this.viewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, a0.getOrCreateKotlinClass(GuildInviteShareSheetViewModel.class), new WidgetGuildInviteShareSheet$appViewModels$$inlined$viewModels$1(f0Var), new h0(widgetGuildInviteShareSheet$viewModel$2));
|
2021-08-03 07:33:18 +00:00
|
|
|
this.guildInviteSettingsLauncher = WidgetGuildInviteSettings.Companion.registerForResult(this, new WidgetGuildInviteShareSheet$guildInviteSettingsLauncher$1(this));
|
|
|
|
this.analyticsSource = "";
|
2021-09-30 06:24:59 +00:00
|
|
|
this.loggingConfig = new LoggingConfig(false, null, new WidgetGuildInviteShareSheet$loggingConfig$1(this), 3);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ String access$getAnalyticsSource$p(WidgetGuildInviteShareSheet widgetGuildInviteShareSheet) {
|
|
|
|
return widgetGuildInviteShareSheet.analyticsSource;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ Bundle access$getArgumentsOrDefault$p(WidgetGuildInviteShareSheet widgetGuildInviteShareSheet) {
|
|
|
|
return widgetGuildInviteShareSheet.getArgumentsOrDefault();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ WidgetGuildInviteShareSheetBinding access$getBinding$p(WidgetGuildInviteShareSheet widgetGuildInviteShareSheet) {
|
|
|
|
return widgetGuildInviteShareSheet.getBinding();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ ActivityResultLauncher access$getGuildInviteSettingsLauncher$p(WidgetGuildInviteShareSheet widgetGuildInviteShareSheet) {
|
|
|
|
return widgetGuildInviteShareSheet.guildInviteSettingsLauncher;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ GuildInviteShareSheetViewModel access$getViewModel$p(WidgetGuildInviteShareSheet widgetGuildInviteShareSheet) {
|
|
|
|
return widgetGuildInviteShareSheet.getViewModel();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final /* synthetic */ void access$setAnalyticsSource$p(WidgetGuildInviteShareSheet widgetGuildInviteShareSheet, String str) {
|
|
|
|
widgetGuildInviteShareSheet.analyticsSource = str;
|
|
|
|
}
|
|
|
|
|
|
|
|
private final void configureEmptyStateUI(GuildInviteShareSheetViewModel.ViewState viewState) {
|
|
|
|
int i = 0;
|
|
|
|
if (this.isFixedHeight) {
|
|
|
|
this.isFixedHeight = false;
|
|
|
|
FrameLayout frameLayout = getBinding().j;
|
|
|
|
m.checkNotNullExpressionValue(frameLayout, "binding.root");
|
|
|
|
if (!ViewCompat.isLaidOut(frameLayout) || frameLayout.isLayoutRequested()) {
|
|
|
|
frameLayout.addOnLayoutChangeListener(new WidgetGuildInviteShareSheet$configureEmptyStateUI$$inlined$doOnLayout$1());
|
|
|
|
} else {
|
|
|
|
ViewGroup.LayoutParams layoutParams = frameLayout.getLayoutParams();
|
|
|
|
Objects.requireNonNull(layoutParams, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams");
|
|
|
|
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) layoutParams;
|
|
|
|
layoutParams2.height = -1;
|
|
|
|
frameLayout.setLayoutParams(layoutParams2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
WidgetGuildInviteShareSheetBinding binding = getBinding();
|
|
|
|
AppViewFlipper appViewFlipper = binding.n;
|
|
|
|
m.checkNotNullExpressionValue(appViewFlipper, "suggestionsFlipper");
|
|
|
|
appViewFlipper.setDisplayedChild(0);
|
|
|
|
NestedScrollView nestedScrollView = binding.f;
|
|
|
|
m.checkNotNullExpressionValue(nestedScrollView, "emptyStateScroller");
|
|
|
|
nestedScrollView.setNestedScrollingEnabled(true);
|
|
|
|
GuildInvite invite = viewState.getInvite();
|
|
|
|
ModelInvite.Settings inviteSettings = viewState.getInviteSettings();
|
|
|
|
CharSequence charSequence = null;
|
|
|
|
if (invite != null) {
|
|
|
|
long expirationTimeMs = invite.getExpirationTimeMs() - ClockFactory.get().currentTimeMillis();
|
|
|
|
TextView textView = binding.d;
|
|
|
|
m.checkNotNullExpressionValue(textView, "emptyStateInviteLink");
|
|
|
|
textView.setText(invite.toLink());
|
|
|
|
TextView textView2 = binding.g;
|
|
|
|
m.checkNotNullExpressionValue(textView2, "emptyStateSettingsSubtext");
|
|
|
|
if (inviteSettings != null) {
|
|
|
|
Context requireContext = requireContext();
|
|
|
|
m.checkNotNullExpressionValue(requireContext, "requireContext()");
|
|
|
|
charSequence = GuildInviteUiHelperKt.getInviteSettingsText(requireContext, expirationTimeMs, inviteSettings.getMaxUses());
|
|
|
|
}
|
|
|
|
textView2.setText(charSequence);
|
|
|
|
} else {
|
|
|
|
TextView textView3 = binding.d;
|
|
|
|
m.checkNotNullExpressionValue(textView3, "emptyStateInviteLink");
|
2021-08-09 22:51:56 +00:00
|
|
|
textView3.setText(getString(R.string.loading));
|
2021-08-03 07:33:18 +00:00
|
|
|
TextView textView4 = binding.g;
|
|
|
|
m.checkNotNullExpressionValue(textView4, "emptyStateSettingsSubtext");
|
|
|
|
textView4.setText((CharSequence) null);
|
|
|
|
}
|
|
|
|
binding.d.setOnClickListener(new WidgetGuildInviteShareSheet$configureEmptyStateUI$$inlined$with$lambda$1(invite, this, viewState));
|
|
|
|
binding.h.setOnClickListener(new WidgetGuildInviteShareSheet$configureEmptyStateUI$$inlined$with$lambda$2(invite, this, viewState));
|
|
|
|
ImageButton imageButton = binding.e;
|
|
|
|
m.checkNotNullExpressionValue(imageButton, "emptyStateLinkOptions");
|
|
|
|
if (!viewState.getShowInviteSettings()) {
|
|
|
|
i = 8;
|
|
|
|
}
|
|
|
|
imageButton.setVisibility(i);
|
|
|
|
binding.e.setOnClickListener(new WidgetGuildInviteShareSheet$configureEmptyStateUI$$inlined$with$lambda$3(invite, this, viewState));
|
|
|
|
}
|
|
|
|
|
|
|
|
private final void configureNormalUI(GuildInviteShareSheetViewModel.ViewState viewState) {
|
|
|
|
boolean z2 = true;
|
|
|
|
if (!this.isFixedHeight) {
|
|
|
|
this.isFixedHeight = true;
|
|
|
|
FrameLayout frameLayout = getBinding().j;
|
|
|
|
m.checkNotNullExpressionValue(frameLayout, "binding.root");
|
|
|
|
if (!ViewCompat.isLaidOut(frameLayout) || frameLayout.isLayoutRequested()) {
|
|
|
|
frameLayout.addOnLayoutChangeListener(new WidgetGuildInviteShareSheet$configureNormalUI$$inlined$doOnLayout$1(this));
|
|
|
|
} else {
|
|
|
|
ViewGroup.LayoutParams layoutParams = frameLayout.getLayoutParams();
|
|
|
|
Objects.requireNonNull(layoutParams, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams");
|
|
|
|
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) layoutParams;
|
|
|
|
Resources resources = getResources();
|
|
|
|
m.checkNotNullExpressionValue(resources, "resources");
|
|
|
|
layoutParams2.height = (int) (((double) resources.getDisplayMetrics().heightPixels) * 0.9d);
|
|
|
|
frameLayout.setLayoutParams(layoutParams2);
|
|
|
|
access$getBinding$p(this).m.requestLayout();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String searchQuery = viewState.getSearchQuery();
|
|
|
|
WidgetGuildInviteShareSheetBinding binding = getBinding();
|
|
|
|
if (!this.restoredSearchQueryFromViewModel && (!t.isBlank(searchQuery))) {
|
|
|
|
this.restoredSearchQueryFromViewModel = true;
|
|
|
|
binding.k.setText(searchQuery);
|
|
|
|
}
|
|
|
|
AppViewFlipper appViewFlipper = binding.n;
|
|
|
|
m.checkNotNullExpressionValue(appViewFlipper, "suggestionsFlipper");
|
|
|
|
appViewFlipper.setDisplayedChild(1);
|
|
|
|
NestedScrollView nestedScrollView = binding.f;
|
|
|
|
m.checkNotNullExpressionValue(nestedScrollView, "emptyStateScroller");
|
|
|
|
int i = 0;
|
|
|
|
nestedScrollView.setNestedScrollingEnabled(false);
|
|
|
|
if (viewState.getChannel() != null) {
|
|
|
|
SearchInputView searchInputView = binding.k;
|
|
|
|
Channel channel = viewState.getChannel();
|
|
|
|
Context requireContext = requireContext();
|
|
|
|
m.checkNotNullExpressionValue(requireContext, "requireContext()");
|
2021-10-08 22:11:56 +00:00
|
|
|
searchInputView.setHint(b.k(this, R.string.invite_your_friends_channel_mobile, new Object[]{ChannelUtils.e(channel, requireContext, false, 2)}, null, 4));
|
2021-08-03 07:33:18 +00:00
|
|
|
} else {
|
|
|
|
SearchInputView searchInputView2 = binding.k;
|
2021-08-09 22:51:56 +00:00
|
|
|
String string = getString(R.string.invite_your_friends);
|
2021-08-03 07:33:18 +00:00
|
|
|
m.checkNotNullExpressionValue(string, "getString(R.string.invite_your_friends)");
|
|
|
|
searchInputView2.setHint(string);
|
|
|
|
}
|
|
|
|
GuildInvite invite = viewState.getInvite();
|
|
|
|
if (invite != null) {
|
|
|
|
CardView cardView = binding.l;
|
|
|
|
m.checkNotNullExpressionValue(cardView, "shareButton");
|
2021-08-09 22:51:56 +00:00
|
|
|
cardView.setContentDescription(b.k(this, R.string.share_invite_mobile, new Object[]{invite}, null, 4));
|
2021-08-03 07:33:18 +00:00
|
|
|
long expirationTimeMs = invite.getExpirationTimeMs() - ClockFactory.get().currentTimeMillis();
|
|
|
|
String link = invite.toLink();
|
|
|
|
Context requireContext2 = requireContext();
|
|
|
|
m.checkNotNullExpressionValue(requireContext2, "requireContext()");
|
|
|
|
CharSequence inviteSettingsText = GuildInviteUiHelperKt.getInviteSettingsText(requireContext2, expirationTimeMs);
|
2021-12-17 21:59:34 +00:00
|
|
|
TextView textView = binding.c;
|
2021-08-03 07:33:18 +00:00
|
|
|
m.checkNotNullExpressionValue(textView, "copyLinkSubtitle");
|
|
|
|
textView.setText(link + ' ' + inviteSettingsText);
|
|
|
|
binding.l.setOnClickListener(new WidgetGuildInviteShareSheet$configureNormalUI$$inlined$with$lambda$1(invite, this, searchQuery, viewState));
|
2021-12-20 07:27:17 +00:00
|
|
|
binding.f2388b.setOnClickListener(new WidgetGuildInviteShareSheet$configureNormalUI$$inlined$with$lambda$2(invite, this, searchQuery, viewState));
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
CardView cardView2 = binding.l;
|
|
|
|
m.checkNotNullExpressionValue(cardView2, "shareButton");
|
|
|
|
if (invite == null) {
|
|
|
|
z2 = false;
|
|
|
|
}
|
|
|
|
cardView2.setVisibility(z2 ? 0 : 8);
|
|
|
|
FrameLayout frameLayout2 = binding.i;
|
|
|
|
m.checkNotNullExpressionValue(frameLayout2, "inviteSettingsButton");
|
|
|
|
if (!viewState.getShowInviteSettings()) {
|
|
|
|
i = 8;
|
|
|
|
}
|
|
|
|
frameLayout2.setVisibility(i);
|
|
|
|
binding.i.setOnClickListener(new WidgetGuildInviteShareSheet$configureNormalUI$$inlined$with$lambda$3(invite, this, searchQuery, viewState));
|
|
|
|
InviteSuggestionsAdapter inviteSuggestionsAdapter = this.adapter;
|
|
|
|
if (inviteSuggestionsAdapter == null) {
|
|
|
|
m.throwUninitializedPropertyAccessException("adapter");
|
|
|
|
}
|
|
|
|
inviteSuggestionsAdapter.setOnClick(new WidgetGuildInviteShareSheet$configureNormalUI$3(this));
|
|
|
|
InviteSuggestionsAdapter inviteSuggestionsAdapter2 = this.adapter;
|
|
|
|
if (inviteSuggestionsAdapter2 == null) {
|
|
|
|
m.throwUninitializedPropertyAccessException("adapter");
|
|
|
|
}
|
|
|
|
inviteSuggestionsAdapter2.setData(viewState.getInviteSuggestionItems());
|
|
|
|
}
|
|
|
|
|
|
|
|
private final WidgetGuildInviteShareSheetBinding getBinding() {
|
|
|
|
return (WidgetGuildInviteShareSheetBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
private final GuildInviteShareSheetViewModel getViewModel() {
|
|
|
|
return (GuildInviteShareSheetViewModel) this.viewModel$delegate.getValue();
|
|
|
|
}
|
|
|
|
|
|
|
|
private final void setUpSearchBar() {
|
|
|
|
getBinding().k.a(this, new WidgetGuildInviteShareSheet$setUpSearchBar$1(this));
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void configureUI(GuildInviteShareSheetViewModel.ViewState viewState) {
|
|
|
|
m.checkNotNullParameter(viewState, "viewState");
|
|
|
|
if (viewState.getHasResults()) {
|
|
|
|
configureNormalUI(viewState);
|
|
|
|
} else {
|
|
|
|
configureEmptyStateUI(viewState);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppBottomSheet
|
|
|
|
public int getContentViewResId() {
|
2021-08-09 22:51:56 +00:00
|
|
|
return R.layout.widget_guild_invite_share_sheet;
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
2021-09-30 06:24:59 +00:00
|
|
|
@Override // com.discord.app.AppBottomSheet, com.discord.app.AppLogger.a
|
|
|
|
public LoggingConfig getLoggingConfig() {
|
|
|
|
return this.loggingConfig;
|
|
|
|
}
|
|
|
|
|
2021-08-03 07:33:18 +00:00
|
|
|
@Override // com.discord.app.AppBottomSheet, androidx.fragment.app.Fragment
|
|
|
|
public void onResume() {
|
|
|
|
super.onResume();
|
2021-08-27 06:37:59 +00:00
|
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(getViewModel().observeViewState(), this, null, 2, null), WidgetGuildInviteShareSheet.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetGuildInviteShareSheet$onResume$1(this), 62, (Object) null);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppBottomSheet, androidx.fragment.app.Fragment
|
|
|
|
public void onViewCreated(View view, Bundle bundle) {
|
|
|
|
m.checkNotNullParameter(view, "view");
|
|
|
|
super.onViewCreated(view, bundle);
|
|
|
|
setBottomSheetCollapsedStateDisabled();
|
2021-08-09 22:51:56 +00:00
|
|
|
String string = getArgumentsOrDefault().getString(ARG_ANALYTICS_SOURCE);
|
2021-08-03 07:33:18 +00:00
|
|
|
if (string == null) {
|
|
|
|
string = "";
|
|
|
|
}
|
|
|
|
this.analyticsSource = string;
|
|
|
|
MGRecyclerAdapter.Companion companion = MGRecyclerAdapter.Companion;
|
|
|
|
RecyclerView recyclerView = getBinding().m;
|
|
|
|
m.checkNotNullExpressionValue(recyclerView, "binding.suggestionList");
|
|
|
|
this.adapter = (InviteSuggestionsAdapter) companion.configure(new InviteSuggestionsAdapter(recyclerView));
|
|
|
|
setUpSearchBar();
|
|
|
|
}
|
|
|
|
}
|