94.6 - Beta (94106)

This commit is contained in:
Juby210 2021-09-28 09:39:28 +02:00
parent 3986a9a4ea
commit 1cb0ada0da
17 changed files with 307 additions and 209 deletions

View file

@ -10,8 +10,8 @@ android {
applicationId 'com.discord' applicationId 'com.discord'
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode 94105 versionCode 94106
versionName "94.5 - Beta" versionName "94.6 - Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="94105" android:versionName="94.5 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="94106" android:versionName="94.6 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/> <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/> <uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

View file

@ -170,23 +170,26 @@ public final class InviteEmbedModel {
StageInstance b; StageInstance b;
m.checkNotNullParameter(str, "inviteCode"); m.checkNotNullParameter(str, "inviteCode");
ModelInvite resolvedInvite = getResolvedInvite(str); ModelInvite resolvedInvite = getResolvedInvite(str);
if (!(resolvedInvite == null || resolvedInvite.getChannel() == null)) { if (resolvedInvite != null) {
Channel channel = resolvedInvite.getChannel(); Channel channel = resolvedInvite.getChannel();
m.checkNotNullExpressionValue(channel, "invite.channel"); if (!(channel != null && AnimatableValueParser.x1(channel))) {
if (AnimatableValueParser.x1(channel)) { channel = null;
StageInstance stageInstance2 = this.stageInstances.get(Long.valueOf(resolvedInvite.getChannel().h())); }
if (channel != null) {
m.checkNotNullExpressionValue(channel, "invite.channel.takeIf { … == true } ?: return null");
StageInstance stageInstance2 = (StageInstance) a.c(channel, this.stageInstances);
if (stageInstance2 != null && AnimatableValueParser.v1(stageInstance2)) { if (stageInstance2 != null && AnimatableValueParser.v1(stageInstance2)) {
return resolvedInvite; return resolvedInvite;
} }
if (this.channels.get(Long.valueOf(resolvedInvite.getChannel().h())) != null) { if (((Channel) a.c(channel, this.channels)) != null) {
return null; return null;
} }
StoreRequestedStageChannels.StageInstanceState stageInstanceState = this.requestedInstances.get(Long.valueOf(resolvedInvite.getChannel().h())); StoreRequestedStageChannels.StageInstanceState stageInstanceState = (StoreRequestedStageChannels.StageInstanceState) a.c(channel, this.requestedInstances);
if (stageInstanceState != null && (stageInstance = stageInstanceState.getStageInstance()) != null && (b = stageInstance.b()) != null && AnimatableValueParser.v1(b)) { if (stageInstanceState != null && (stageInstance = stageInstanceState.getStageInstance()) != null && (b = stageInstance.b()) != null && AnimatableValueParser.v1(b)) {
return resolvedInvite; return resolvedInvite;
} }
if (stageInstanceState == null || stageInstanceState.isError()) { if (stageInstanceState == null || stageInstanceState.isError()) {
StoreStream.Companion.getRequestedStageChannels().enqueueStageChannelFetch(resolvedInvite.getChannel().h()); StoreStream.Companion.getRequestedStageChannels().enqueueStageChannelFetch(channel.h());
} }
} }
} }

View file

@ -78,7 +78,10 @@ public final class AuthInviteInfoView extends RelativeLayout {
this(context, (i2 & 2) != 0 ? null : attributeSet, (i2 & 4) != 0 ? 0 : i); this(context, (i2 & 2) != 0 ? null : attributeSet, (i2 & 4) != 0 ? 0 : i);
} }
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x007e: APUT (r2v4 java.lang.Object[]), (0 ??[int, short, byte, char]), (r11v9 java.lang.String) */ /* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x008a: APUT (r2v4 java.lang.Object[]), (0 ??[int, short, byte, char]), (r10v9 java.lang.String) */
/* JADX WARNING: Code restructure failed: missing block: B:26:0x0060, code lost:
if ((com.airbnb.lottie.parser.AnimatableValueParser.y0(r0).length() == 0) != true) goto L_0x0062;
*/
private final CharSequence getIntroText(ModelInvite modelInvite) { private final CharSequence getIntroText(ModelInvite modelInvite) {
User inviter = modelInvite.getInviter(); User inviter = modelInvite.getInviter();
String r = inviter != null ? inviter.r() : null; String r = inviter != null ? inviter.r() : null;
@ -89,21 +92,21 @@ public final class AuthInviteInfoView extends RelativeLayout {
return b.h(context, R.string.instant_invite_you_have_been_invited_to_chat_with, new Object[0], null, 4); return b.h(context, R.string.instant_invite_you_have_been_invited_to_chat_with, new Object[0], null, 4);
} }
Channel channel = modelInvite.getChannel(); Channel channel = modelInvite.getChannel();
m.checkNotNullExpressionValue(channel, "channel"); if (channel != null && AnimatableValueParser.r1(channel)) {
if (AnimatableValueParser.r1(channel)) {
Channel channel2 = modelInvite.getChannel(); Channel channel2 = modelInvite.getChannel();
m.checkNotNullExpressionValue(channel2, "channel"); if (channel2 != null) {
if ((AnimatableValueParser.y0(channel2).length() == 0) || !z2) { }
if (z2) {
Context context2 = getContext(); Context context2 = getContext();
m.checkNotNullExpressionValue(context2, "context"); m.checkNotNullExpressionValue(context2, "context");
return b.h(context2, R.string.instant_invite_you_have_been_invited_to_join_group_dm, new Object[0], null, 4); Object[] objArr = new Object[1];
User inviter2 = modelInvite.getInviter();
objArr[0] = inviter2 != null ? inviter2.r() : null;
return b.h(context2, R.string.auth_message_invited_by, objArr, null, 4);
} }
Context context3 = getContext(); Context context3 = getContext();
m.checkNotNullExpressionValue(context3, "context"); m.checkNotNullExpressionValue(context3, "context");
Object[] objArr = new Object[1]; return b.h(context3, R.string.instant_invite_you_have_been_invited_to_join_group_dm, new Object[0], null, 4);
User inviter2 = modelInvite.getInviter();
objArr[0] = inviter2 != null ? inviter2.r() : null;
return b.h(context3, R.string.auth_message_invited_by, objArr, null, 4);
} else if (modelInvite.getApproximateMemberCount() >= 200 || !z2) { } else if (modelInvite.getApproximateMemberCount() >= 200 || !z2) {
Context context4 = getContext(); Context context4 = getContext();
m.checkNotNullExpressionValue(context4, "context"); m.checkNotNullExpressionValue(context4, "context");
@ -145,6 +148,7 @@ public final class AuthInviteInfoView extends RelativeLayout {
m.checkNotNullExpressionValue(imageView, "binding.authInviteInfoTemplateIcon"); m.checkNotNullExpressionValue(imageView, "binding.authInviteInfoTemplateIcon");
imageView.setVisibility(8); imageView.setVisibility(8);
Channel channel = modelInvite.getChannel(); Channel channel = modelInvite.getChannel();
String str2 = null;
Integer valueOf = channel != null ? Integer.valueOf(channel.A()) : null; Integer valueOf = channel != null ? Integer.valueOf(channel.A()) : null;
if ((valueOf != null && valueOf.intValue() == 5) || ((valueOf != null && valueOf.intValue() == 0) || ((valueOf != null && valueOf.intValue() == 2) || (valueOf != null && valueOf.intValue() == 13)))) { if ((valueOf != null && valueOf.intValue() == 5) || ((valueOf != null && valueOf.intValue() == 0) || ((valueOf != null && valueOf.intValue() == 2) || (valueOf != null && valueOf.intValue() == 13)))) {
Guild guild = modelInvite.getGuild(); Guild guild = modelInvite.getGuild();
@ -163,11 +167,11 @@ public final class AuthInviteInfoView extends RelativeLayout {
} }
return; return;
} }
String str2 = ""; String str3 = "";
if (valueOf != null && valueOf.intValue() == 3) { if (valueOf != null && valueOf.intValue() == 3) {
User inviter = modelInvite.getInviter(); User inviter = modelInvite.getInviter();
if (!(inviter == null || (r = inviter.r()) == null)) { if (!(inviter == null || (r = inviter.r()) == null)) {
str2 = r; str3 = r;
} }
SimpleDraweeView simpleDraweeView3 = this.binding.b; SimpleDraweeView simpleDraweeView3 = this.binding.b;
m.checkNotNullExpressionValue(simpleDraweeView3, "binding.authInviteInfoGuildAvatar"); m.checkNotNullExpressionValue(simpleDraweeView3, "binding.authInviteInfoGuildAvatar");
@ -179,27 +183,30 @@ public final class AuthInviteInfoView extends RelativeLayout {
TextView textView4 = this.binding.f1670c; TextView textView4 = this.binding.f1670c;
m.checkNotNullExpressionValue(textView4, "binding.authInviteInfoGuildName"); m.checkNotNullExpressionValue(textView4, "binding.authInviteInfoGuildName");
Channel channel2 = modelInvite.getChannel(); Channel channel2 = modelInvite.getChannel();
m.checkNotNullExpressionValue(channel2, "invite.channel"); if (channel2 != null) {
if (AnimatableValueParser.y0(channel2).length() > 0) { if (AnimatableValueParser.y0(channel2).length() > 0) {
z2 = true; z2 = true;
}
if (z2) {
Channel channel3 = modelInvite.getChannel();
if (channel3 != null) {
str2 = AnimatableValueParser.y0(channel3);
}
str3 = str2;
}
} }
if (z2) { textView4.setText(str3);
Channel channel3 = modelInvite.getChannel();
m.checkNotNullExpressionValue(channel3, "invite.channel");
str2 = AnimatableValueParser.y0(channel3);
}
textView4.setText(str2);
} else if (valueOf == null) { } else if (valueOf == null) {
User inviter3 = modelInvite.getInviter(); User inviter3 = modelInvite.getInviter();
if (inviter3 == null || (str = inviter3.r()) == null) { if (inviter3 == null || (str = inviter3.r()) == null) {
str = str2; str = str3;
} }
StringBuilder U = a.U(str, "#"); StringBuilder U = a.U(str, "#");
User inviter4 = modelInvite.getInviter(); User inviter4 = modelInvite.getInviter();
if (!(inviter4 == null || (f = inviter4.f()) == null)) { if (!(inviter4 == null || (f = inviter4.f()) == null)) {
str2 = f; str3 = f;
} }
U.append(str2); U.append(str3);
String sb = U.toString(); String sb = U.toString();
SimpleDraweeView simpleDraweeView4 = this.binding.b; SimpleDraweeView simpleDraweeView4 = this.binding.b;
m.checkNotNullExpressionValue(simpleDraweeView4, "binding.authInviteInfoGuildAvatar"); m.checkNotNullExpressionValue(simpleDraweeView4, "binding.authInviteInfoGuildAvatar");

View file

@ -37,29 +37,34 @@ public final class WidgetChatListAdapterItemGuildScheduledEventInvite$Model$Comp
@Override // kotlin.jvm.functions.Function0 @Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */ /* renamed from: invoke */
public final WidgetChatListAdapterItemGuildScheduledEventInvite.Model mo1invoke() { public final WidgetChatListAdapterItemGuildScheduledEventInvite.Model mo1invoke() {
Channel channel;
Guild guild; Guild guild;
GuildScheduledEvent guildScheduledEvent = this.$item.getGuildScheduledEvent(); GuildScheduledEvent guildScheduledEvent = this.$item.getGuildScheduledEvent();
Channel channel = this.$item.getInvite().getChannel(); Channel channel2 = this.$item.getInvite().getChannel();
com.discord.api.guild.Guild guild2 = this.$item.getInvite().getGuild(); Guild guild2 = null;
Channel a = Channel.a(channel, null, 0, guild2 != null ? guild2.p() : 0, null, 0, 0, 0, null, null, 0, null, 0, 0, null, 0, 0, null, false, 0, null, 0, null, null, null, null, null, null, null, null, 536870907); if (channel2 != null) {
com.discord.api.guild.Guild guild3 = this.$item.getInvite().getGuild();
channel = Channel.a(channel2, null, 0, guild3 != null ? guild3.p() : 0, null, 0, 0, 0, null, null, 0, null, 0, 0, null, 0, 0, null, false, 0, null, 0, null, null, null, null, null, null, null, null, 536870907);
} else {
channel = null;
}
ModelInvite invite = this.$item.getInvite(); ModelInvite invite = this.$item.getInvite();
boolean z2 = this.$guildStore.getMember(this.$item.getGuildScheduledEvent().f(), this.$userStore.getMe().getId()) != null; boolean z2 = this.$guildStore.getMember(this.$item.getGuildScheduledEvent().f(), this.$userStore.getMe().getId()) != null;
boolean isRsvpedToEvent = this.$guildScheduledEventStore.isRsvpedToEvent(this.$item.getGuildScheduledEvent().g()); boolean isRsvpedToEvent = this.$guildScheduledEventStore.isRsvpedToEvent(this.$item.getGuildScheduledEvent().g());
GuildScheduledEvent findEventFromStore = this.$guildScheduledEventStore.findEventFromStore(guildScheduledEvent.g(), Long.valueOf(guildScheduledEvent.f())); GuildScheduledEvent findEventFromStore = this.$guildScheduledEventStore.findEventFromStore(guildScheduledEvent.g(), Long.valueOf(guildScheduledEvent.f()));
GuildScheduledEvent guildScheduledEvent2 = findEventFromStore != null ? findEventFromStore : guildScheduledEvent; GuildScheduledEvent guildScheduledEvent2 = findEventFromStore != null ? findEventFromStore : guildScheduledEvent;
Channel channel2 = this.$channelStore.getChannel(a.h()); Channel channel3 = channel != null ? this.$channelStore.getChannel(channel.h()) : null;
Channel channel3 = channel2 != null ? channel2 : a; Guild guild4 = this.$guildStore.getGuild(this.$item.getGuildScheduledEvent().f());
Guild guild3 = this.$guildStore.getGuild(this.$item.getGuildScheduledEvent().f()); if (guild4 != null) {
if (guild3 == null) { guild = guild4;
com.discord.api.guild.Guild guild4 = this.$item.getInvite().getGuild(); } else {
if (guild4 != null) { com.discord.api.guild.Guild guild5 = this.$item.getInvite().getGuild();
m.checkNotNullExpressionValue(guild4, "apiGuild"); if (guild5 != null) {
guild = new Guild(guild4); m.checkNotNullExpressionValue(guild5, "apiGuild");
return new WidgetChatListAdapterItemGuildScheduledEventInvite.Model(invite, z2, isRsvpedToEvent, guildScheduledEvent2, channel3, guild, Long.valueOf(this.$voiceChannelSelectedStore.getSelectedVoiceChannelId())); guild2 = new Guild(guild5);
} }
guild3 = null; guild = guild2;
} }
guild = guild3;
return new WidgetChatListAdapterItemGuildScheduledEventInvite.Model(invite, z2, isRsvpedToEvent, guildScheduledEvent2, channel3, guild, Long.valueOf(this.$voiceChannelSelectedStore.getSelectedVoiceChannelId())); return new WidgetChatListAdapterItemGuildScheduledEventInvite.Model(invite, z2, isRsvpedToEvent, guildScheduledEvent2, channel3, guild, Long.valueOf(this.$voiceChannelSelectedStore.getSelectedVoiceChannelId()));
} }
} }

View file

@ -89,7 +89,6 @@ public final class WidgetChatListAdapterItemGuildScheduledEventInvite extends Wi
public Model(ModelInvite modelInvite, boolean z2, boolean z3, GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, Long l) { public Model(ModelInvite modelInvite, boolean z2, boolean z3, GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, Long l) {
m.checkNotNullParameter(modelInvite, "invite"); m.checkNotNullParameter(modelInvite, "invite");
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent"); m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
m.checkNotNullParameter(channel, "channel");
this.invite = modelInvite; this.invite = modelInvite;
this.isInGuild = z2; this.isInGuild = z2;
this.isRsvped = z3; this.isRsvped = z3;
@ -155,7 +154,6 @@ public final class WidgetChatListAdapterItemGuildScheduledEventInvite extends Wi
public final Model copy(ModelInvite modelInvite, boolean z2, boolean z3, GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, Long l) { public final Model copy(ModelInvite modelInvite, boolean z2, boolean z3, GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, Long l) {
m.checkNotNullParameter(modelInvite, "invite"); m.checkNotNullParameter(modelInvite, "invite");
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent"); m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
m.checkNotNullParameter(channel, "channel");
return new Model(modelInvite, z2, z3, guildScheduledEvent, channel, guild, l); return new Model(modelInvite, z2, z3, guildScheduledEvent, channel, guild, l);
} }

View file

@ -1,9 +1,7 @@
package com.discord.widgets.chat.list.adapter; package com.discord.widgets.chat.list.adapter;
import c.d.b.a.a;
import com.discord.api.channel.Channel; import com.discord.api.channel.Channel;
import com.discord.api.stageinstance.StageInstance; import com.discord.api.stageinstance.StageInstance;
import com.discord.models.domain.ModelInvite;
import com.discord.models.user.User; import com.discord.models.user.User;
import com.discord.stores.StoreAccessibility; import com.discord.stores.StoreAccessibility;
import com.discord.stores.StoreChannels; import com.discord.stores.StoreChannels;
@ -16,7 +14,6 @@ import com.discord.widgets.chat.list.adapter.WidgetChatListAdapterItemStageInvit
import com.discord.widgets.chat.list.entries.StageInviteEntry; import com.discord.widgets.chat.list.entries.StageInviteEntry;
import com.discord.widgets.stage.StageRoles; import com.discord.widgets.stage.StageRoles;
import d0.t.n; import d0.t.n;
import d0.z.d.m;
import d0.z.d.o; import d0.z.d.o;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -45,13 +42,17 @@ public final class WidgetChatListAdapterItemStageInvite$Model$Companion$observe$
this.$guildStore = storeGuilds; this.$guildStore = storeGuilds;
} }
/* JADX WARNING: Removed duplicated region for block: B:24:0x00e4 */ /* JADX WARNING: Removed duplicated region for block: B:35:0x00f8 */
/* JADX WARNING: Removed duplicated region for block: B:36:0x00fa */
@Override // kotlin.jvm.functions.Function0 @Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */ /* renamed from: invoke */
public final WidgetChatListAdapterItemStageInvite.Model mo1invoke() { public final WidgetChatListAdapterItemStageInvite.Model mo1invoke() {
Channel channel; Channel channel;
StageInstance stageInstance;
StageInstance stageInstance2;
List list;
Integer num; Integer num;
Integer num2; Integer valueOf;
long id2 = this.$userStore.getMe().getId(); long id2 = this.$userStore.getMe().getId();
User user = this.$userStore.getUsers().get(Long.valueOf(this.$item.getUserId())); User user = this.$userStore.getUsers().get(Long.valueOf(this.$item.getUserId()));
Channel channel2 = this.$item.getInvite().getChannel(); Channel channel2 = this.$item.getInvite().getChannel();
@ -59,39 +60,41 @@ public final class WidgetChatListAdapterItemStageInvite$Model$Companion$observe$
channel = this.$item.getInvite().getChannel(); channel = this.$item.getInvite().getChannel();
} }
boolean isReducedMotionEnabled = this.$accessibilityStore.isReducedMotionEnabled(); boolean isReducedMotionEnabled = this.$accessibilityStore.isReducedMotionEnabled();
StageInstance stageInstanceForChannel = this.$stageInstanceStore.getStageInstanceForChannel(channel.h()); if (channel != null) {
if (stageInstanceForChannel == null) { long h = channel.h();
stageInstanceForChannel = this.$requestedInstanceStore.getStageInstanceForChannel(channel.h()); StageInstance stageInstanceForChannel = this.$stageInstanceStore.getStageInstanceForChannel(h);
if (stageInstanceForChannel == null) {
stageInstanceForChannel = this.$requestedInstanceStore.getStageInstanceForChannel(h);
}
stageInstance = stageInstanceForChannel;
} else {
stageInstance = null;
} }
Map<Long, StageRoles> channelRoles = this.$stageChannelStore.getChannelRoles(channel.h()); Map<Long, StageRoles> channelRoles = channel != null ? this.$stageChannelStore.getChannelRoles(channel.h()) : null;
StoreRequestedStageChannels.StageInstanceState stageInstanceState = (StoreRequestedStageChannels.StageInstanceState) a.c(channel, this.$requestedInstanceStore.getRequestedInstanceStatesByChannel()); StoreRequestedStageChannels.StageInstanceState stageInstanceState = channel != null ? this.$requestedInstanceStore.getRequestedInstanceStatesByChannel().get(Long.valueOf(channel.h())) : null;
WidgetChatListAdapterItemStageInvite.Model.Companion companion = WidgetChatListAdapterItemStageInvite.Model.Companion; if (channel != null) {
List access$speakersFromLocalStore = WidgetChatListAdapterItemStageInvite.Model.Companion.access$speakersFromLocalStore(companion, this.$guildStore, this.$userStore, this.$stageChannelStore, channel.h(), this.$item.getGuildId()); long h2 = channel.h();
if (access$speakersFromLocalStore == null) { WidgetChatListAdapterItemStageInvite.Model.Companion companion = WidgetChatListAdapterItemStageInvite.Model.Companion;
access$speakersFromLocalStore = WidgetChatListAdapterItemStageInvite.Model.Companion.access$speakersFromRequest(companion, stageInstanceState); stageInstance2 = stageInstance;
} list = WidgetChatListAdapterItemStageInvite.Model.Companion.access$speakersFromLocalStore(companion, this.$guildStore, this.$userStore, this.$stageChannelStore, h2, this.$item.getGuildId());
if (channelRoles == null || access$speakersFromLocalStore == null) { if (list == null) {
if ((stageInstanceState != null ? stageInstanceState.getStageInstance() : null) != null) { list = WidgetChatListAdapterItemStageInvite.Model.Companion.access$speakersFromRequest(companion, stageInstanceState);
num2 = Integer.valueOf(stageInstanceState.getStageInstance().c() - stageInstanceState.getStageInstance().g().size());
} else {
num = null;
ModelInvite invite = this.$item.getInvite();
m.checkNotNullExpressionValue(channel, "channel");
boolean z2 = !isReducedMotionEnabled;
if (access$speakersFromLocalStore == null) {
access$speakersFromLocalStore = n.emptyList();
}
return new WidgetChatListAdapterItemStageInvite.Model(invite, id2, user, channel, z2, stageInstanceForChannel, access$speakersFromLocalStore, num);
} }
} else { } else {
num2 = Integer.valueOf(channelRoles.size() - access$speakersFromLocalStore.size()); stageInstance2 = stageInstance;
list = null;
} }
num = num2; if (channelRoles == null || list == null) {
ModelInvite invite = this.$item.getInvite(); if ((stageInstanceState != null ? stageInstanceState.getStageInstance() : null) != null) {
m.checkNotNullExpressionValue(channel, "channel"); valueOf = Integer.valueOf(stageInstanceState.getStageInstance().c() - stageInstanceState.getStageInstance().g().size());
boolean z2 = !isReducedMotionEnabled; } else {
if (access$speakersFromLocalStore == null) { num = null;
return new WidgetChatListAdapterItemStageInvite.Model(this.$item.getInvite(), id2, user, channel, !isReducedMotionEnabled, stageInstance2, list == null ? list : n.emptyList(), num);
}
} else {
valueOf = Integer.valueOf(channelRoles.size() - list.size());
} }
return new WidgetChatListAdapterItemStageInvite.Model(invite, id2, user, channel, z2, stageInstanceForChannel, access$speakersFromLocalStore, num); num = valueOf;
return new WidgetChatListAdapterItemStageInvite.Model(this.$item.getInvite(), id2, user, channel, !isReducedMotionEnabled, stageInstance2, list == null ? list : n.emptyList(), num);
} }
} }

View file

@ -3,13 +3,13 @@ package com.discord.widgets.chat.list.adapter;
import android.content.Context; import android.content.Context;
import android.view.View; import android.view.View;
import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentManager;
import com.discord.api.channel.Channel;
import com.discord.api.guild.Guild; import com.discord.api.guild.Guild;
import com.discord.models.domain.ModelInvite; import com.discord.models.domain.ModelInvite;
import com.discord.widgets.chat.list.adapter.WidgetChatListAdapterItemStageInvite; import com.discord.widgets.chat.list.adapter.WidgetChatListAdapterItemStageInvite;
import com.discord.widgets.stage.StageChannelJoinHelper; import com.discord.widgets.stage.StageChannelJoinHelper;
import d0.l; import d0.l;
import d0.w.h.c; import d0.w.h.c;
import d0.w.i.a.b;
import d0.w.i.a.e; import d0.w.i.a.e;
import d0.w.i.a.k; import d0.w.i.a.k;
import d0.z.d.m; import d0.z.d.m;
@ -24,22 +24,26 @@ public final class WidgetChatListAdapterItemStageInvite$configureUI$2 implements
public final /* synthetic */ WidgetChatListAdapterItemStageInvite this$0; public final /* synthetic */ WidgetChatListAdapterItemStageInvite this$0;
/* compiled from: WidgetChatListAdapterItemStageInvite.kt */ /* compiled from: WidgetChatListAdapterItemStageInvite.kt */
@e(c = "com.discord.widgets.chat.list.adapter.WidgetChatListAdapterItemStageInvite$configureUI$2$1", f = "WidgetChatListAdapterItemStageInvite.kt", l = {115}, m = "invokeSuspend") @e(c = "com.discord.widgets.chat.list.adapter.WidgetChatListAdapterItemStageInvite$configureUI$2$1", f = "WidgetChatListAdapterItemStageInvite.kt", l = {121}, m = "invokeSuspend")
/* renamed from: com.discord.widgets.chat.list.adapter.WidgetChatListAdapterItemStageInvite$configureUI$2$1 reason: invalid class name */ /* renamed from: com.discord.widgets.chat.list.adapter.WidgetChatListAdapterItemStageInvite$configureUI$2$1 reason: invalid class name */
public static final class AnonymousClass1 extends k implements Function2<ModelInvite, Continuation<? super Unit>, Object> { public static final class AnonymousClass1 extends k implements Function2<ModelInvite, Continuation<? super Unit>, Object> {
public final /* synthetic */ long $channelId;
public final /* synthetic */ long $guildId;
public int label; public int label;
public final /* synthetic */ WidgetChatListAdapterItemStageInvite$configureUI$2 this$0; public final /* synthetic */ WidgetChatListAdapterItemStageInvite$configureUI$2 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */ /* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(WidgetChatListAdapterItemStageInvite$configureUI$2 widgetChatListAdapterItemStageInvite$configureUI$2, Continuation continuation) { public AnonymousClass1(WidgetChatListAdapterItemStageInvite$configureUI$2 widgetChatListAdapterItemStageInvite$configureUI$2, long j, long j2, Continuation continuation) {
super(2, continuation); super(2, continuation);
this.this$0 = widgetChatListAdapterItemStageInvite$configureUI$2; this.this$0 = widgetChatListAdapterItemStageInvite$configureUI$2;
this.$guildId = j;
this.$channelId = j2;
} }
@Override // d0.w.i.a.a @Override // d0.w.i.a.a
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) { public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
m.checkNotNullParameter(continuation, "completion"); m.checkNotNullParameter(continuation, "completion");
return new AnonymousClass1(this.this$0, continuation); return new AnonymousClass1(this.this$0, this.$guildId, this.$channelId, continuation);
} }
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@ -50,7 +54,6 @@ public final class WidgetChatListAdapterItemStageInvite$configureUI$2 implements
@Override // d0.w.i.a.a @Override // d0.w.i.a.a
public final Object invokeSuspend(Object obj) { public final Object invokeSuspend(Object obj) {
Long boxLong;
Object coroutine_suspended = c.getCOROUTINE_SUSPENDED(); Object coroutine_suspended = c.getCOROUTINE_SUSPENDED();
int i = this.label; int i = this.label;
if (i == 0) { if (i == 0) {
@ -59,11 +62,10 @@ public final class WidgetChatListAdapterItemStageInvite$configureUI$2 implements
Context context = this.this$0.$context; Context context = this.this$0.$context;
m.checkNotNullExpressionValue(context, "context"); m.checkNotNullExpressionValue(context, "context");
FragmentManager fragmentManager = WidgetChatListAdapterItemStageInvite.access$getAdapter$p(this.this$0.this$0).getFragmentManager(); FragmentManager fragmentManager = WidgetChatListAdapterItemStageInvite.access$getAdapter$p(this.this$0.this$0).getFragmentManager();
Guild guild = this.this$0.$model.getInvite().getGuild(); long j = this.$guildId;
long f = (guild == null || (boxLong = b.boxLong(guild.p())) == null) ? this.this$0.$model.getChannel().f() : boxLong.longValue(); long j2 = this.$channelId;
long h = this.this$0.$model.getChannel().h();
this.label = 1; this.label = 1;
if (StageChannelJoinHelper.lurkAndJoinStageAsync$default(stageChannelJoinHelper, context, fragmentManager, f, h, true, null, null, null, this, 224, null) == coroutine_suspended) { if (StageChannelJoinHelper.lurkAndJoinStageAsync$default(stageChannelJoinHelper, context, fragmentManager, j, j2, true, null, null, null, this, 224, null) == coroutine_suspended) {
return coroutine_suspended; return coroutine_suspended;
} }
} else if (i == 1) { } else if (i == 1) {
@ -81,12 +83,41 @@ public final class WidgetChatListAdapterItemStageInvite$configureUI$2 implements
this.$context = context; this.$context = context;
} }
/* JADX WARNING: Removed duplicated region for block: B:18:? A[RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:9:0x0025 */
@Override // android.view.View.OnClickListener @Override // android.view.View.OnClickListener
public final void onClick(View view) { public final void onClick(View view) {
Job access$getInviteJoinJob$p = WidgetChatListAdapterItemStageInvite.access$getInviteJoinJob$p(this.this$0); Long l;
if (access$getInviteJoinJob$p == null || !access$getInviteJoinJob$p.a()) { long f;
WidgetChatListAdapterItemStageInvite widgetChatListAdapterItemStageInvite = this.this$0; Guild guild = this.$model.getInvite().getGuild();
WidgetChatListAdapterItemStageInvite.access$setInviteJoinJob$p(widgetChatListAdapterItemStageInvite, WidgetChatListAdapterItemInviteBase.joinServerOrDM$default(widgetChatListAdapterItemStageInvite, widgetChatListAdapterItemStageInvite.getClass(), this.$model.getInvite(), new AnonymousClass1(this, null), null, 8, null)); if (guild != null) {
f = guild.p();
} else {
Channel channel = this.$model.getChannel();
if (channel != null) {
f = channel.f();
} else {
l = null;
if (l == null) {
long longValue = l.longValue();
Channel channel2 = this.$model.getChannel();
if (channel2 != null) {
long h = channel2.h();
Job access$getInviteJoinJob$p = WidgetChatListAdapterItemStageInvite.access$getInviteJoinJob$p(this.this$0);
if (access$getInviteJoinJob$p == null || !access$getInviteJoinJob$p.a()) {
WidgetChatListAdapterItemStageInvite widgetChatListAdapterItemStageInvite = this.this$0;
WidgetChatListAdapterItemStageInvite.access$setInviteJoinJob$p(widgetChatListAdapterItemStageInvite, WidgetChatListAdapterItemInviteBase.joinServerOrDM$default(widgetChatListAdapterItemStageInvite, widgetChatListAdapterItemStageInvite.getClass(), this.$model.getInvite(), new AnonymousClass1(this, longValue, h, null), null, 8, null));
return;
}
return;
}
return;
}
return;
}
}
l = Long.valueOf(f);
if (l == null) {
} }
} }
} }

View file

@ -144,7 +144,6 @@ public final class WidgetChatListAdapterItemStageInvite extends WidgetChatListAd
public Model(ModelInvite modelInvite, long j, User user, Channel channel, boolean z2, StageInstance stageInstance, List<StageCardSpeaker> list, Integer num) { public Model(ModelInvite modelInvite, long j, User user, Channel channel, boolean z2, StageInstance stageInstance, List<StageCardSpeaker> list, Integer num) {
m.checkNotNullParameter(modelInvite, "invite"); m.checkNotNullParameter(modelInvite, "invite");
m.checkNotNullParameter(channel, "channel");
m.checkNotNullParameter(list, "speakers"); m.checkNotNullParameter(list, "speakers");
this.invite = modelInvite; this.invite = modelInvite;
this.meId = j; this.meId = j;
@ -194,7 +193,6 @@ public final class WidgetChatListAdapterItemStageInvite extends WidgetChatListAd
public final Model copy(ModelInvite modelInvite, long j, User user, Channel channel, boolean z2, StageInstance stageInstance, List<StageCardSpeaker> list, Integer num) { public final Model copy(ModelInvite modelInvite, long j, User user, Channel channel, boolean z2, StageInstance stageInstance, List<StageCardSpeaker> list, Integer num) {
m.checkNotNullParameter(modelInvite, "invite"); m.checkNotNullParameter(modelInvite, "invite");
m.checkNotNullParameter(channel, "channel");
m.checkNotNullParameter(list, "speakers"); m.checkNotNullParameter(list, "speakers");
return new Model(modelInvite, j, user, channel, z2, stageInstance, list, num); return new Model(modelInvite, j, user, channel, z2, stageInstance, list, num);
} }
@ -386,17 +384,20 @@ public final class WidgetChatListAdapterItemStageInvite extends WidgetChatListAd
m.checkNotNullExpressionValue(textView2, "binding.itemInviteGuildName"); m.checkNotNullExpressionValue(textView2, "binding.itemInviteGuildName");
Guild guild5 = model.getInvite().getGuild(); Guild guild5 = model.getInvite().getGuild();
if (guild5 == null || (str = guild5.v()) == null) { if (guild5 == null || (str = guild5.v()) == null) {
str = model.getChannel().m(); Channel channel = model.getChannel();
str = channel != null ? channel.m() : null;
} }
textView2.setText(str); ViewExtensions.setTextAndVisibilityBy(textView2, str);
TextView textView3 = this.binding.b; TextView textView3 = this.binding.b;
m.checkNotNullExpressionValue(textView3, "binding.itemInviteChannelTopic"); m.checkNotNullExpressionValue(textView3, "binding.itemInviteChannelTopic");
StageInstance stageInstance = model.getStageInstance(); StageInstance stageInstance = model.getStageInstance();
if (stageInstance == null || (str2 = stageInstance.f()) == null) { if (stageInstance == null || (str2 = stageInstance.f()) == null) {
str2 = model.getChannel().z(); Channel channel2 = model.getChannel();
str2 = channel2 != null ? channel2.z() : null;
} }
if (str2 == null) { if (str2 == null) {
str2 = model.getChannel().m(); Channel channel3 = model.getChannel();
str2 = channel3 != null ? channel3.m() : null;
} }
ViewExtensions.setTextAndVisibilityBy(textView3, str2); ViewExtensions.setTextAndVisibilityBy(textView3, str2);
TextView textView4 = this.binding.g; TextView textView4 = this.binding.g;

View file

@ -39,7 +39,7 @@ import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Ref$ObjectRef; import kotlin.jvm.internal.Ref$ObjectRef;
import kotlinx.coroutines.CoroutineScope; import kotlinx.coroutines.CoroutineScope;
/* compiled from: InviteJoinHelper.kt */ /* compiled from: InviteJoinHelper.kt */
@e(c = "com.discord.widgets.guilds.invite.InviteJoinHelper$joinViaInvite$4", f = "InviteJoinHelper.kt", l = {70, 99, 101, 103, 137, 168}, m = "invokeSuspend") @e(c = "com.discord.widgets.guilds.invite.InviteJoinHelper$joinViaInvite$4", f = "InviteJoinHelper.kt", l = {70, 99, 101, 103, 139, 170}, m = "invokeSuspend")
public final class InviteJoinHelper$joinViaInvite$4 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> { public final class InviteJoinHelper$joinViaInvite$4 extends k implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
public final /* synthetic */ AppFragment $fragment; public final /* synthetic */ AppFragment $fragment;
public final /* synthetic */ ModelInvite $invite; public final /* synthetic */ ModelInvite $invite;
@ -75,16 +75,17 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
return ((InviteJoinHelper$joinViaInvite$4) create(coroutineScope, continuation)).invokeSuspend(Unit.a); return ((InviteJoinHelper$joinViaInvite$4) create(coroutineScope, continuation)).invokeSuspend(Unit.a);
} }
/* JADX WARNING: Removed duplicated region for block: B:116:0x02b5 */ /* JADX WARNING: Removed duplicated region for block: B:124:0x02bc */
/* JADX WARNING: Removed duplicated region for block: B:117:0x02c3 */ /* JADX WARNING: Removed duplicated region for block: B:125:0x02ca */
/* JADX WARNING: Removed duplicated region for block: B:127:0x0318 */ /* JADX WARNING: Removed duplicated region for block: B:137:0x031e */
/* JADX WARNING: Removed duplicated region for block: B:130:0x0329 A[RETURN] */ /* JADX WARNING: Removed duplicated region for block: B:140:0x032f A[RETURN] */
/* JADX WARNING: Removed duplicated region for block: B:67:0x0184 */ /* JADX WARNING: Removed duplicated region for block: B:67:0x0184 */
/* JADX WARNING: Removed duplicated region for block: B:71:0x01b0 A[RETURN] */ /* JADX WARNING: Removed duplicated region for block: B:71:0x01b0 A[RETURN] */
/* JADX WARNING: Removed duplicated region for block: B:74:0x01c2 A[RETURN] */ /* JADX WARNING: Removed duplicated region for block: B:74:0x01c2 A[RETURN] */
/* JADX WARNING: Removed duplicated region for block: B:75:0x01c3 */ /* JADX WARNING: Removed duplicated region for block: B:75:0x01c3 */
/* JADX WARNING: Removed duplicated region for block: B:78:0x01d9 */ /* JADX WARNING: Removed duplicated region for block: B:78:0x01d0 */
/* JADX WARNING: Removed duplicated region for block: B:88:0x021f */ /* JADX WARNING: Removed duplicated region for block: B:91:0x021b */
/* JADX WARNING: Removed duplicated region for block: B:94:0x0227 */
/* JADX WARNING: Unknown variable types count: 2 */ /* JADX WARNING: Unknown variable types count: 2 */
@Override // d0.w.i.a.a @Override // d0.w.i.a.a
public final Object invokeSuspend(Object obj) { public final Object invokeSuspend(Object obj) {
@ -94,7 +95,9 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
Object obj2; Object obj2;
Channel channel; Channel channel;
Long boxLong; Long boxLong;
boolean z2;
Boolean boxBoolean; Boolean boxBoolean;
Boolean boxBoolean2;
Object obj3; Object obj3;
Ref$ObjectRef ref$ObjectRef2; Ref$ObjectRef ref$ObjectRef2;
ModelInvite modelInvite2; ModelInvite modelInvite2;
@ -105,7 +108,7 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
List<GuildFeature> l2; List<GuildFeature> l2;
List<GuildFeature> l3; List<GuildFeature> l3;
Object coroutine_suspended = c.getCOROUTINE_SUSPENDED(); Object coroutine_suspended = c.getCOROUTINE_SUSPENDED();
boolean z2 = false; boolean z3 = false;
switch (this.label) { switch (this.label) {
case 0: case 0:
l.throwOnFailure(obj); l.throwOnFailure(obj);
@ -116,15 +119,15 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
m.checkNotNullExpressionValue(parentFragmentManager, "fragment.parentFragmentManager"); m.checkNotNullExpressionValue(parentFragmentManager, "fragment.parentFragmentManager");
ref$ObjectRef3.element = parentFragmentManager; ref$ObjectRef3.element = parentFragmentManager;
Guild guild = this.$invite.getGuild(); Guild guild = this.$invite.getGuild();
boolean z3 = (guild == null || (l3 = guild.l()) == null || !l3.contains(GuildFeature.MEMBER_VERIFICATION_GATE_ENABLED)) ? false : true; boolean z4 = (guild == null || (l3 = guild.l()) == null || !l3.contains(GuildFeature.MEMBER_VERIFICATION_GATE_ENABLED)) ? false : true;
Guild guild2 = this.$invite.getGuild(); Guild guild2 = this.$invite.getGuild();
boolean z4 = (guild2 == null || (l2 = guild2.l()) == null || l2.contains(GuildFeature.PREVIEW_ENABLED)) ? false : true; boolean z5 = (guild2 == null || (l2 = guild2.l()) == null || l2.contains(GuildFeature.PREVIEW_ENABLED)) ? false : true;
Guild guild3 = this.$invite.getGuild(); Guild guild3 = this.$invite.getGuild();
boolean z5 = (guild3 == null || (l = guild3.l()) == null || !l.contains(GuildFeature.HUB)) ? false : true; boolean z6 = (guild3 == null || (l = guild3.l()) == null || !l.contains(GuildFeature.HUB)) ? false : true;
if (z5 && !GrowthTeamFeatures.INSTANCE.isHubEnabled()) { if (z6 && !GrowthTeamFeatures.INSTANCE.isHubEnabled()) {
c.a.d.m.g(ref$ObjectRef2.element, R.string.discord_u_coming_soon_to_mobile, 0, null, 12); c.a.d.m.g(ref$ObjectRef2.element, R.string.discord_u_coming_soon_to_mobile, 0, null, 12);
} else if (!z5 || !GrowthTeamFeatures.INSTANCE.isHubEmailConnectionEnabled()) { } else if (!z6 || !GrowthTeamFeatures.INSTANCE.isHubEmailConnectionEnabled()) {
if (z3 && z4) { if (z4 && z5) {
this.L$0 = ref$ObjectRef2; this.L$0 = ref$ObjectRef2;
this.L$1 = ref$ObjectRef3; this.L$1 = ref$ObjectRef3;
this.L$2 = this; this.L$2 = this;
@ -164,11 +167,21 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
ref$ObjectRef = ref$ObjectRef2; ref$ObjectRef = ref$ObjectRef2;
modelInvite = modelInvite2; modelInvite = modelInvite2;
channel = this.$invite.getChannel(); channel = this.$invite.getChannel();
m.checkNotNullExpressionValue(channel, "invite.channel"); if (channel != null) {
if (AnimatableValueParser.m1(channel)) { m.checkNotNullExpressionValue(channel, "channel");
Long l4 = StoreStream.Companion.getPermissions().getPermissionsByChannel().get(d0.w.i.a.b.boxLong(this.$invite.getChannel().h())); if (AnimatableValueParser.m1(channel)) {
if ((l4 == null || (boxBoolean = d0.w.i.a.b.boxBoolean(PermissionUtils.can(Permission.CONNECT, d0.w.i.a.b.boxLong(l4.longValue())))) == null) ? false : boxBoolean.booleanValue()) { Long l4 = StoreStream.Companion.getPermissions().getPermissionsByChannel().get(d0.w.i.a.b.boxLong(channel.h()));
z2 = true; if ((l4 == null || (boxBoolean2 = d0.w.i.a.b.boxBoolean(PermissionUtils.can(Permission.CONNECT, d0.w.i.a.b.boxLong(l4.longValue())))) == null) ? false : boxBoolean2.booleanValue()) {
z2 = true;
boxBoolean = d0.w.i.a.b.boxBoolean(z2);
if (boxBoolean != null) {
z3 = boxBoolean.booleanValue();
}
}
}
z2 = false;
boxBoolean = d0.w.i.a.b.boxBoolean(z2);
if (boxBoolean != null) {
} }
} }
if (this.$invite.getGuild() != null) { if (this.$invite.getGuild() != null) {
@ -193,19 +206,48 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
} }
} }
Channel channel2 = this.$invite.getChannel(); Channel channel2 = this.$invite.getChannel();
m.checkNotNullExpressionValue(channel2, "invite.channel"); if (channel2 == null || !AnimatableValueParser.D1(channel2)) {
if (!AnimatableValueParser.D1(channel2)) {
Channel channel3 = this.$invite.getChannel(); Channel channel3 = this.$invite.getChannel();
m.checkNotNullExpressionValue(channel3, "invite.channel"); if (channel3 == null || !AnimatableValueParser.x1(channel3)) {
if (!AnimatableValueParser.x1(channel3)) {
InviteJoinHelper.access$navigateToChannel(InviteJoinHelper.INSTANCE, ref$ObjectRef.element, this.$fragment, this.$invite); InviteJoinHelper.access$navigateToChannel(InviteJoinHelper.INSTANCE, ref$ObjectRef.element, this.$fragment, this.$invite);
} else if (!z2) { function2 = this.$onInviteFlowFinished;
if (modelInvite == null) {
}
this.L$0 = null;
this.L$1 = null;
this.L$2 = null;
this.label = 6;
if (function2.invoke(modelInvite, this) == coroutine_suspended) {
}
return Unit.a;
}
if (!z3) {
InviteJoinHelper.access$navigateToGuild(InviteJoinHelper.INSTANCE, this.$invite); InviteJoinHelper.access$navigateToGuild(InviteJoinHelper.INSTANCE, this.$invite);
} else { } else {
InviteJoinHelper.access$navigateToChannel(InviteJoinHelper.INSTANCE, ref$ObjectRef.element, this.$fragment, this.$invite); InviteJoinHelper.access$navigateToChannel(InviteJoinHelper.INSTANCE, ref$ObjectRef.element, this.$fragment, this.$invite);
} }
} else if (!z2) { function2 = this.$onInviteFlowFinished;
if (modelInvite == null) {
}
this.L$0 = null;
this.L$1 = null;
this.L$2 = null;
this.label = 6;
if (function2.invoke(modelInvite, this) == coroutine_suspended) {
}
return Unit.a;
} else if (!z3) {
InviteJoinHelper.access$navigateToGuild(InviteJoinHelper.INSTANCE, this.$invite); InviteJoinHelper.access$navigateToGuild(InviteJoinHelper.INSTANCE, this.$invite);
function2 = this.$onInviteFlowFinished;
if (modelInvite == null) {
}
this.L$0 = null;
this.L$1 = null;
this.L$2 = null;
this.label = 6;
if (function2.invoke(modelInvite, this) == coroutine_suspended) {
}
return Unit.a;
} else { } else {
this.L$0 = ref$ObjectRef; this.L$0 = ref$ObjectRef;
this.L$1 = modelInvite; this.L$1 = modelInvite;
@ -225,17 +267,17 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
} else { } else {
InviteJoinHelper.access$navigateToGuild(InviteJoinHelper.INSTANCE, this.$invite); InviteJoinHelper.access$navigateToGuild(InviteJoinHelper.INSTANCE, this.$invite);
} }
function2 = this.$onInviteFlowFinished;
if (modelInvite == null) {
}
this.L$0 = null;
this.L$1 = null;
this.L$2 = null;
this.label = 6;
if (function2.invoke(modelInvite, this) == coroutine_suspended) {
}
return Unit.a;
} }
function2 = this.$onInviteFlowFinished;
if (modelInvite == null) {
}
this.L$0 = null;
this.L$1 = null;
this.L$2 = null;
this.label = 6;
if (function2.invoke(modelInvite, this) == coroutine_suspended) {
}
return Unit.a;
} }
} }
ChannelSelector.selectChannel$default(ChannelSelector.Companion.getInstance(), this.$invite.getChannel(), null, null, 6, null); ChannelSelector.selectChannel$default(ChannelSelector.Companion.getInstance(), this.$invite.getChannel(), null, null, 6, null);
@ -311,8 +353,7 @@ public final class InviteJoinHelper$joinViaInvite$4 extends k implements Functio
try { try {
l.throwOnFailure(obj); l.throwOnFailure(obj);
channel = this.$invite.getChannel(); channel = this.$invite.getChannel();
m.checkNotNullExpressionValue(channel, "invite.channel"); if (channel != null) {
if (AnimatableValueParser.m1(channel)) {
} }
if (this.$invite.getGuild() != null) { if (this.$invite.getGuild() != null) {
} }

View file

@ -45,24 +45,22 @@ public final class InviteJoinHelper {
} }
private final void navigateToChannel(Context context, AppFragment appFragment, ModelInvite modelInvite) { private final void navigateToChannel(Context context, AppFragment appFragment, ModelInvite modelInvite) {
ChannelSelector.Companion.getInstance().findAndSet(context, modelInvite.getChannel().h());
Channel channel = modelInvite.getChannel(); Channel channel = modelInvite.getChannel();
m.checkNotNullExpressionValue(channel, "modelInvite.channel"); if (channel != null) {
if (AnimatableValueParser.D1(channel)) { ChannelSelector.Companion.getInstance().findAndSet(context, channel.h());
WidgetVoiceBottomSheet.Companion companion = WidgetVoiceBottomSheet.Companion; m.checkNotNullExpressionValue(channel, "channel");
FragmentManager parentFragmentManager = appFragment.getParentFragmentManager(); if (AnimatableValueParser.D1(channel)) {
m.checkNotNullExpressionValue(parentFragmentManager, "appFragment.parentFragmentManager"); WidgetVoiceBottomSheet.Companion companion = WidgetVoiceBottomSheet.Companion;
companion.show(parentFragmentManager, modelInvite.getChannel().h(), true, WidgetVoiceBottomSheet.FeatureContext.HOME); FragmentManager parentFragmentManager = appFragment.getParentFragmentManager();
return; m.checkNotNullExpressionValue(parentFragmentManager, "appFragment.parentFragmentManager");
} companion.show(parentFragmentManager, channel.h(), true, WidgetVoiceBottomSheet.FeatureContext.HOME);
Channel channel2 = modelInvite.getChannel(); } else if (AnimatableValueParser.x1(channel)) {
m.checkNotNullExpressionValue(channel2, "modelInvite.channel"); StageChannelJoinHelper stageChannelJoinHelper = StageChannelJoinHelper.INSTANCE;
if (AnimatableValueParser.x1(channel2)) { Context requireContext = appFragment.requireContext();
StageChannelJoinHelper stageChannelJoinHelper = StageChannelJoinHelper.INSTANCE; FragmentManager parentFragmentManager2 = appFragment.getParentFragmentManager();
Context requireContext = appFragment.requireContext(); m.checkNotNullExpressionValue(parentFragmentManager2, "appFragment.parentFragmentManager");
FragmentManager parentFragmentManager2 = appFragment.getParentFragmentManager(); StageChannelJoinHelper.connectToStage$default(stageChannelJoinHelper, requireContext, parentFragmentManager2, channel.h(), false, false, null, null, null, null, null, PointerIconCompat.TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW, null);
m.checkNotNullExpressionValue(parentFragmentManager2, "appFragment.parentFragmentManager"); }
StageChannelJoinHelper.connectToStage$default(stageChannelJoinHelper, requireContext, parentFragmentManager2, modelInvite.getChannel().h(), false, false, null, null, null, null, null, PointerIconCompat.TYPE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW, null);
} }
} }

View file

@ -144,42 +144,44 @@ public final class WidgetInviteInfo extends ConstraintLayout {
this.binding.e.setTextSize(2, 18.0f); this.binding.e.setTextSize(2, 18.0f);
} }
/* JADX WARNING: Code restructure failed: missing block: B:25:0x006a, code lost: /* JADX WARNING: Code restructure failed: missing block: B:27:0x006c, code lost:
if ((r6.length() > 0) == true) goto L_0x006e; if ((r6.length() > 0) == true) goto L_0x0070;
*/ */
private final void configureForGDM(ModelInvite modelInvite) { private final void configureForGDM(ModelInvite modelInvite) {
SimpleDraweeView simpleDraweeView = this.binding.f1852c;
m.checkNotNullExpressionValue(simpleDraweeView, "binding.inviteAvatarSmall");
User inviter = modelInvite.getInviter();
IconUtils.setIcon$default(simpleDraweeView, inviter != null ? new CoreUser(inviter) : null, R.dimen.avatar_size_hero, null, null, null, 56, null);
Channel channel = modelInvite.getChannel(); Channel channel = modelInvite.getChannel();
User inviter2 = modelInvite.getInviter(); if (channel != null) {
String r = inviter2 != null ? inviter2.r() : null; m.checkNotNullExpressionValue(channel, "model.channel ?: return");
if (r == null) { SimpleDraweeView simpleDraweeView = this.binding.f1852c;
r = ""; m.checkNotNullExpressionValue(simpleDraweeView, "binding.inviteAvatarSmall");
User inviter = modelInvite.getInviter();
IconUtils.setIcon$default(simpleDraweeView, inviter != null ? new CoreUser(inviter) : null, R.dimen.avatar_size_hero, null, null, null, 56, null);
User inviter2 = modelInvite.getInviter();
String r = inviter2 != null ? inviter2.r() : null;
if (r == null) {
r = "";
}
boolean z2 = true;
int i = 0;
String y0 = AnimatableValueParser.y0(channel).length() > 0 ? AnimatableValueParser.y0(channel) : r;
if (AnimatableValueParser.r1(channel) && (r6 = channel.g()) != null) {
}
z2 = false;
this.binding.b.a(z2 ? IconUtils.getForChannel$default(channel, null, 2, null) : IconUtils.INSTANCE.getDefaultForGroupDM(channel.h()), null);
SimpleDraweeView simpleDraweeView2 = this.binding.f1852c;
m.checkNotNullExpressionValue(simpleDraweeView2, "binding.inviteAvatarSmall");
if (!z2) {
i = 8;
}
simpleDraweeView2.setVisibility(i);
TextView textView = this.binding.e;
m.checkNotNullExpressionValue(textView, "binding.inviteMessage");
textView.setText(getFormattedGuildName(y0));
TextView textView2 = this.binding.f;
m.checkNotNullExpressionValue(textView2, "binding.inviteTitle");
textView2.setText(getIntroTextForGroup(r, AnimatableValueParser.y0(channel)));
this.binding.d.setOnline(null);
this.binding.d.setMembers(Integer.valueOf(modelInvite.getApproximateMemberCount()));
} }
m.checkNotNullExpressionValue(channel, "channel");
boolean z2 = true;
int i = 0;
String y0 = AnimatableValueParser.y0(channel).length() > 0 ? AnimatableValueParser.y0(channel) : r;
if (AnimatableValueParser.r1(channel) && (r6 = channel.g()) != null) {
}
z2 = false;
this.binding.b.a(z2 ? IconUtils.getForChannel$default(channel, null, 2, null) : IconUtils.INSTANCE.getDefaultForGroupDM(channel.h()), null);
SimpleDraweeView simpleDraweeView2 = this.binding.f1852c;
m.checkNotNullExpressionValue(simpleDraweeView2, "binding.inviteAvatarSmall");
if (!z2) {
i = 8;
}
simpleDraweeView2.setVisibility(i);
TextView textView = this.binding.e;
m.checkNotNullExpressionValue(textView, "binding.inviteMessage");
textView.setText(getFormattedGuildName(y0));
TextView textView2 = this.binding.f;
m.checkNotNullExpressionValue(textView2, "binding.inviteTitle");
textView2.setText(getIntroTextForGroup(r, AnimatableValueParser.y0(channel)));
this.binding.d.setOnline(null);
this.binding.d.setMembers(Integer.valueOf(modelInvite.getApproximateMemberCount()));
} }
private final void configureForGuild(ModelInvite modelInvite) { private final void configureForGuild(ModelInvite modelInvite) {

View file

@ -57,11 +57,12 @@ public final class WidgetInviteModel {
return null; return null;
} }
/* JADX WARNING: Removed duplicated region for block: B:36:0x00d2 */ /* JADX WARNING: Removed duplicated region for block: B:38:0x00d4 */
/* JADX WARNING: Removed duplicated region for block: B:37:0x00d4 */ /* JADX WARNING: Removed duplicated region for block: B:39:0x00d6 */
public final WidgetInviteModel create(ModelInvite.Settings settings, Map<Long, Channel> map, InviteGenerator.InviteGenerationState inviteGenerationState, Long l, MeUser meUser, List<Channel> list, Guild guild, Map<Long, StageInstance> map2, GuildScheduledEvent guildScheduledEvent, ModelInvite modelInvite) { public final WidgetInviteModel create(ModelInvite.Settings settings, Map<Long, Channel> map, InviteGenerator.InviteGenerationState inviteGenerationState, Long l, MeUser meUser, List<Channel> list, Guild guild, Map<Long, StageInstance> map2, GuildScheduledEvent guildScheduledEvent, ModelInvite modelInvite) {
boolean z2; boolean z2;
ModelInvite modelInvite2; ModelInvite modelInvite2;
Channel channel;
m.checkNotNullParameter(settings, "settings"); m.checkNotNullParameter(settings, "settings");
m.checkNotNullParameter(map, "invitableChannels"); m.checkNotNullParameter(map, "invitableChannels");
m.checkNotNullParameter(inviteGenerationState, "inviteGenerationState"); m.checkNotNullParameter(inviteGenerationState, "inviteGenerationState");
@ -74,22 +75,22 @@ public final class WidgetInviteModel {
ModelInvite lastGeneratedInvite = inviteGenerationState.getLastGeneratedInvite(); ModelInvite lastGeneratedInvite = inviteGenerationState.getLastGeneratedInvite();
ArrayList arrayList = new ArrayList(map.values()); ArrayList arrayList = new ArrayList(map.values());
Collections.sort(arrayList, AnimatableValueParser.K0(Channel.Companion)); Collections.sort(arrayList, AnimatableValueParser.K0(Channel.Companion));
Channel channel = map.containsKey(l) ? map.get(l) : arrayList.isEmpty() ^ true ? (Channel) arrayList.get(0) : null; Channel channel2 = map.containsKey(l) ? map.get(l) : arrayList.isEmpty() ^ true ? (Channel) arrayList.get(0) : null;
boolean z3 = (lastGeneratedInvite == null || channel == null || lastGeneratedInvite.getChannel() == null || lastGeneratedInvite.getChannel().h() != channel.h()) ? false : true; boolean z3 = (lastGeneratedInvite == null || channel2 == null || lastGeneratedInvite.getChannel() == null || (channel = lastGeneratedInvite.getChannel()) == null || channel.h() != channel2.h()) ? false : true;
if (channel == null || inviteGenerationState.getState() == InviteGenerator.GenerationState.FAILURE) { if (channel2 == null || inviteGenerationState.getState() == InviteGenerator.GenerationState.FAILURE) {
modelInvite2 = tryGetStaticInvite(l, guild, map2); modelInvite2 = tryGetStaticInvite(l, guild, map2);
if (modelInvite2 != null) { if (modelInvite2 != null) {
z2 = true; z2 = true;
if (!(channel == null || guildScheduledEvent == null || !guildScheduledEvent.n(channel.h()) || modelInvite2 == null)) { if (!(channel2 == null || guildScheduledEvent == null || !guildScheduledEvent.n(channel2.h()) || modelInvite2 == null)) {
modelInvite2.setGuildScheduledEvent(guildScheduledEvent); modelInvite2.setGuildScheduledEvent(guildScheduledEvent);
} }
return new WidgetInviteModel(channel, settings, modelInvite2, inviteGenerationState.getState() != InviteGenerator.GenerationState.GENERATING, z2, arrayList, meUser, list, false); return new WidgetInviteModel(channel2, settings, modelInvite2, inviteGenerationState.getState() != InviteGenerator.GenerationState.GENERATING, z2, arrayList, meUser, list, false);
} }
} }
z2 = z3; z2 = z3;
modelInvite2 = lastGeneratedInvite; modelInvite2 = lastGeneratedInvite;
modelInvite2.setGuildScheduledEvent(guildScheduledEvent); modelInvite2.setGuildScheduledEvent(guildScheduledEvent);
return new WidgetInviteModel(channel, settings, modelInvite2, inviteGenerationState.getState() != InviteGenerator.GenerationState.GENERATING, z2, arrayList, meUser, list, false); return new WidgetInviteModel(channel2, settings, modelInvite2, inviteGenerationState.getState() != InviteGenerator.GenerationState.GENERATING, z2, arrayList, meUser, list, false);
} }
} }

View file

@ -216,11 +216,13 @@ public final class WidgetServerSettingsInstantInvites extends AppFragment {
String str2; String str2;
m.checkNotNullParameter(inviteItem, "other"); m.checkNotNullParameter(inviteItem, "other");
Channel channel = this.invite.getChannel(); Channel channel = this.invite.getChannel();
String str3 = null;
String y0 = channel != null ? AnimatableValueParser.y0(channel) : null;
Channel channel2 = inviteItem.invite.getChannel(); Channel channel2 = inviteItem.invite.getChannel();
m.checkNotNullExpressionValue(channel, "channel1"); if (channel2 != null) {
String y0 = AnimatableValueParser.y0(channel); str3 = AnimatableValueParser.y0(channel2);
m.checkNotNullExpressionValue(channel2, "channel2"); }
int compareTo = t.compareTo(y0, AnimatableValueParser.y0(channel2), true); int compareTo = (y0 == null || str3 == null) ? 0 : t.compareTo(y0, str3, true);
User inviter = this.invite.getInviter(); User inviter = this.invite.getInviter();
User inviter2 = inviteItem.invite.getInviter(); User inviter2 = inviteItem.invite.getInviter();
if (compareTo != 0) { if (compareTo != 0) {

View file

@ -17,6 +17,7 @@ import com.discord.models.domain.ModelInvite;
import com.discord.models.user.CoreUser; import com.discord.models.user.CoreUser;
import com.discord.utilities.color.ColorCompat; import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.mg_recycler.MGRecyclerViewHolder; import com.discord.utilities.mg_recycler.MGRecyclerViewHolder;
import com.discord.utilities.view.extensions.ViewExtensions;
import com.discord.views.user.SettingsMemberView; import com.discord.views.user.SettingsMemberView;
import com.discord.widgets.servers.settings.invites.WidgetServerSettingsInstantInvites; import com.discord.widgets.servers.settings.invites.WidgetServerSettingsInstantInvites;
import d0.z.d.m; import d0.z.d.m;
@ -154,6 +155,7 @@ public final class WidgetServerSettingsInstantInvitesListItem extends MGRecycler
} }
public void onConfigure(int i, WidgetServerSettingsInstantInvites.Model.InviteItem inviteItem) { public void onConfigure(int i, WidgetServerSettingsInstantInvites.Model.InviteItem inviteItem) {
String str;
m.checkNotNullParameter(inviteItem, "data"); m.checkNotNullParameter(inviteItem, "data");
super.onConfigure(i, (int) inviteItem); super.onConfigure(i, (int) inviteItem);
User inviter = inviteItem.getInvite().getInviter(); User inviter = inviteItem.getInvite().getInviter();
@ -167,13 +169,17 @@ public final class WidgetServerSettingsInstantInvitesListItem extends MGRecycler
TextView textView3 = this.binding.b; TextView textView3 = this.binding.b;
m.checkNotNullExpressionValue(textView3, "binding.inviteChannel"); m.checkNotNullExpressionValue(textView3, "binding.inviteChannel");
Channel channel = inviteItem.getInvite().getChannel(); Channel channel = inviteItem.getInvite().getChannel();
m.checkNotNullExpressionValue(channel, "data.invite.channel");
TextView textView4 = this.binding.b;
m.checkNotNullExpressionValue(textView4, "binding.inviteChannel");
Context context = textView4.getContext();
m.checkNotNullExpressionValue(context, "binding.inviteChannel.context");
boolean z2 = true; boolean z2 = true;
textView3.setText(AnimatableValueParser.z0(channel, context, true)); if (channel != null) {
TextView textView4 = this.binding.b;
m.checkNotNullExpressionValue(textView4, "binding.inviteChannel");
Context context = textView4.getContext();
m.checkNotNullExpressionValue(context, "binding.inviteChannel.context");
str = AnimatableValueParser.z0(channel, context, true);
} else {
str = null;
}
ViewExtensions.setTextAndVisibilityBy(textView3, str);
SettingsMemberView settingsMemberView = this.binding.f; SettingsMemberView settingsMemberView = this.binding.f;
m.checkNotNullExpressionValue(settingsMemberView, "binding.settingsMember"); m.checkNotNullExpressionValue(settingsMemberView, "binding.settingsMember");
if (inviter == null) { if (inviter == null) {

View file

@ -314,7 +314,7 @@ public final class WidgetSettings extends AppFragment implements OnTabSelectedLi
TextView textView = binding.f; TextView textView = binding.f;
m.checkNotNullExpressionValue(textView, "appInfoHeader"); m.checkNotNullExpressionValue(textView, "appInfoHeader");
String string = getString(R.string.app_information); String string = getString(R.string.app_information);
textView.setText(string + " - 94.5 - Beta (94105)"); textView.setText(string + " - 94.6 - Beta (94106)");
binding.A.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this)); binding.A.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this));
binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE); binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE);
binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE); binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE);

View file

@ -1426,7 +1426,7 @@
<string name="color_picker_title">Select a color</string> <string name="color_picker_title">Select a color</string>
<string name="color_picker_transparency">Transparency</string> <string name="color_picker_transparency">Transparency</string>
<string name="color_picker_use_default">Use Default</string> <string name="color_picker_use_default">Use Default</string>
<string name="res_2131887506_com_crashlytics_android_build_id">7dc5abcaad534b0c84db391d79058673</string> <string name="res_2131887506_com_crashlytics_android_build_id">15b5454eff894039bd9f0c0008c9217e</string>
<string name="coming_soon">Coming Soon</string> <string name="coming_soon">Coming Soon</string>
<string name="command_accessibility_desc_app_header_item">Slash command application {applicationName}</string> <string name="command_accessibility_desc_app_header_item">Slash command application {applicationName}</string>
<string name="command_accessibility_desc_app_item">{applicationName} application</string> <string name="command_accessibility_desc_app_item">{applicationName} application</string>