95.3 - Alpha (95203)

This commit is contained in:
Juby210 2021-09-29 19:50:51 +02:00
parent 94c8b0b188
commit 0569417098
56 changed files with 858 additions and 444 deletions

View File

@ -10,8 +10,8 @@ android {
applicationId 'com.discord'
minSdkVersion 21
targetSdkVersion 29
versionCode 95202
versionName "95.2 - Alpha"
versionCode 95203
versionName "95.3 - Alpha"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="95202" android:versionName="95.2 - Alpha" 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="95203" android:versionName="95.3 - Alpha" 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-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

View File

@ -6,38 +6,43 @@ import d0.z.d.m;
/* compiled from: GuildRoleSubscriptionBenefit.kt */
public final class GuildRoleSubscriptionBenefit {
private final String description;
private final String emojiId;
private final Long emojiId;
private final String emojiName;
private final String name;
private final Long refId;
private final GuildRoleSubscriptionBenefitType refType;
public GuildRoleSubscriptionBenefit(String str, String str2, GuildRoleSubscriptionBenefitType guildRoleSubscriptionBenefitType, String str3, Long l) {
m.checkNotNullParameter(str, "emojiId");
public GuildRoleSubscriptionBenefit(Long l, String str, String str2, GuildRoleSubscriptionBenefitType guildRoleSubscriptionBenefitType, String str3, Long l2) {
m.checkNotNullParameter(str2, ModelAuditLogEntry.CHANGE_KEY_NAME);
m.checkNotNullParameter(guildRoleSubscriptionBenefitType, "refType");
this.emojiId = str;
this.emojiId = l;
this.emojiName = str;
this.name = str2;
this.refType = guildRoleSubscriptionBenefitType;
this.description = str3;
this.refId = l;
this.refId = l2;
}
public final String a() {
return this.description;
}
public final String b() {
public final Long b() {
return this.emojiId;
}
public final String c() {
return this.emojiName;
}
public final String d() {
return this.name;
}
public final Long c() {
public final Long e() {
return this.refId;
}
public final GuildRoleSubscriptionBenefitType d() {
return this.refType;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
@ -46,29 +51,37 @@ public final class GuildRoleSubscriptionBenefit {
return false;
}
GuildRoleSubscriptionBenefit guildRoleSubscriptionBenefit = (GuildRoleSubscriptionBenefit) obj;
return m.areEqual(this.emojiId, guildRoleSubscriptionBenefit.emojiId) && m.areEqual(this.name, guildRoleSubscriptionBenefit.name) && m.areEqual(this.refType, guildRoleSubscriptionBenefit.refType) && m.areEqual(this.description, guildRoleSubscriptionBenefit.description) && m.areEqual(this.refId, guildRoleSubscriptionBenefit.refId);
return m.areEqual(this.emojiId, guildRoleSubscriptionBenefit.emojiId) && m.areEqual(this.emojiName, guildRoleSubscriptionBenefit.emojiName) && m.areEqual(this.name, guildRoleSubscriptionBenefit.name) && m.areEqual(this.refType, guildRoleSubscriptionBenefit.refType) && m.areEqual(this.description, guildRoleSubscriptionBenefit.description) && m.areEqual(this.refId, guildRoleSubscriptionBenefit.refId);
}
public final GuildRoleSubscriptionBenefitType f() {
return this.refType;
}
public int hashCode() {
String str = this.emojiId;
Long l = this.emojiId;
int i = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31;
int hashCode = (l != null ? l.hashCode() : 0) * 31;
String str = this.emojiName;
int hashCode2 = (hashCode + (str != null ? str.hashCode() : 0)) * 31;
String str2 = this.name;
int hashCode2 = (hashCode + (str2 != null ? str2.hashCode() : 0)) * 31;
int hashCode3 = (hashCode2 + (str2 != null ? str2.hashCode() : 0)) * 31;
GuildRoleSubscriptionBenefitType guildRoleSubscriptionBenefitType = this.refType;
int hashCode3 = (hashCode2 + (guildRoleSubscriptionBenefitType != null ? guildRoleSubscriptionBenefitType.hashCode() : 0)) * 31;
int hashCode4 = (hashCode3 + (guildRoleSubscriptionBenefitType != null ? guildRoleSubscriptionBenefitType.hashCode() : 0)) * 31;
String str3 = this.description;
int hashCode4 = (hashCode3 + (str3 != null ? str3.hashCode() : 0)) * 31;
Long l = this.refId;
if (l != null) {
i = l.hashCode();
int hashCode5 = (hashCode4 + (str3 != null ? str3.hashCode() : 0)) * 31;
Long l2 = this.refId;
if (l2 != null) {
i = l2.hashCode();
}
return hashCode4 + i;
return hashCode5 + i;
}
public String toString() {
StringBuilder P = a.P("GuildRoleSubscriptionBenefit(emojiId=");
P.append(this.emojiId);
P.append(", emojiName=");
P.append(this.emojiName);
P.append(", name=");
P.append(this.name);
P.append(", refType=");

View File

@ -6,6 +6,7 @@ import java.util.List;
import java.util.Objects;
/* compiled from: GuildRoleSubscriptionGroupListing.kt */
public final class GuildRoleSubscriptionGroupListing {
private final long applicationId;
private final String description;
private final long guildId;
@ -15,45 +16,47 @@ public final class GuildRoleSubscriptionGroupListing {
private final List<Long> subscriptionListingIds;
private final List<GuildRoleSubscriptionTierListing> subscriptionListings;
public GuildRoleSubscriptionGroupListing(long j, long j2, long j3, String str, List<Long> list, List<GuildRoleSubscriptionTierListing> list2) {
public GuildRoleSubscriptionGroupListing(long j, long j2, long j3, long j4, String str, List<Long> list, List<GuildRoleSubscriptionTierListing> list2) {
this.f1576id = j;
this.guildId = j2;
this.imageAssetId = j3;
this.applicationId = j3;
this.imageAssetId = j4;
this.description = str;
this.subscriptionListingIds = list;
this.subscriptionListings = list2;
}
public static GuildRoleSubscriptionGroupListing a(GuildRoleSubscriptionGroupListing guildRoleSubscriptionGroupListing, long j, long j2, long j3, String str, List list, List list2, int i) {
long j4 = (i & 1) != 0 ? guildRoleSubscriptionGroupListing.f1576id : j;
long j5 = (i & 2) != 0 ? guildRoleSubscriptionGroupListing.guildId : j2;
long j6 = (i & 4) != 0 ? guildRoleSubscriptionGroupListing.imageAssetId : j3;
public static GuildRoleSubscriptionGroupListing a(GuildRoleSubscriptionGroupListing guildRoleSubscriptionGroupListing, long j, long j2, long j3, long j4, String str, List list, List list2, int i) {
long j5 = (i & 1) != 0 ? guildRoleSubscriptionGroupListing.f1576id : j;
long j6 = (i & 2) != 0 ? guildRoleSubscriptionGroupListing.guildId : j2;
long j7 = (i & 4) != 0 ? guildRoleSubscriptionGroupListing.applicationId : j3;
long j8 = (i & 8) != 0 ? guildRoleSubscriptionGroupListing.imageAssetId : j4;
List<Long> list3 = null;
String str2 = (i & 8) != 0 ? guildRoleSubscriptionGroupListing.description : null;
if ((i & 16) != 0) {
String str2 = (i & 16) != 0 ? guildRoleSubscriptionGroupListing.description : null;
if ((i & 32) != 0) {
list3 = guildRoleSubscriptionGroupListing.subscriptionListingIds;
}
List list4 = (i & 32) != 0 ? guildRoleSubscriptionGroupListing.subscriptionListings : list2;
List list4 = (i & 64) != 0 ? guildRoleSubscriptionGroupListing.subscriptionListings : list2;
Objects.requireNonNull(guildRoleSubscriptionGroupListing);
return new GuildRoleSubscriptionGroupListing(j4, j5, j6, str2, list3, list4);
return new GuildRoleSubscriptionGroupListing(j5, j6, j7, j8, str2, list3, list4);
}
public final String b() {
public final long b() {
return this.applicationId;
}
public final String c() {
return this.description;
}
public final long c() {
public final long d() {
return this.f1576id;
}
public final long d() {
public final long e() {
return this.imageAssetId;
}
public final List<Long> e() {
return this.subscriptionListingIds;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
@ -62,18 +65,23 @@ public final class GuildRoleSubscriptionGroupListing {
return false;
}
GuildRoleSubscriptionGroupListing guildRoleSubscriptionGroupListing = (GuildRoleSubscriptionGroupListing) obj;
return this.f1576id == guildRoleSubscriptionGroupListing.f1576id && this.guildId == guildRoleSubscriptionGroupListing.guildId && this.imageAssetId == guildRoleSubscriptionGroupListing.imageAssetId && m.areEqual(this.description, guildRoleSubscriptionGroupListing.description) && m.areEqual(this.subscriptionListingIds, guildRoleSubscriptionGroupListing.subscriptionListingIds) && m.areEqual(this.subscriptionListings, guildRoleSubscriptionGroupListing.subscriptionListings);
return this.f1576id == guildRoleSubscriptionGroupListing.f1576id && this.guildId == guildRoleSubscriptionGroupListing.guildId && this.applicationId == guildRoleSubscriptionGroupListing.applicationId && this.imageAssetId == guildRoleSubscriptionGroupListing.imageAssetId && m.areEqual(this.description, guildRoleSubscriptionGroupListing.description) && m.areEqual(this.subscriptionListingIds, guildRoleSubscriptionGroupListing.subscriptionListingIds) && m.areEqual(this.subscriptionListings, guildRoleSubscriptionGroupListing.subscriptionListings);
}
public final List<GuildRoleSubscriptionTierListing> f() {
public final List<Long> f() {
return this.subscriptionListingIds;
}
public final List<GuildRoleSubscriptionTierListing> g() {
return this.subscriptionListings;
}
public int hashCode() {
long j = this.f1576id;
long j2 = this.guildId;
long j3 = this.imageAssetId;
int i = ((((((int) (j ^ (j >>> 32))) * 31) + ((int) (j2 ^ (j2 >>> 32)))) * 31) + ((int) (j3 ^ (j3 >>> 32)))) * 31;
long j3 = this.applicationId;
long j4 = this.imageAssetId;
int i = ((((((((int) (j ^ (j >>> 32))) * 31) + ((int) (j2 ^ (j2 >>> 32)))) * 31) + ((int) (j3 ^ (j3 >>> 32)))) * 31) + ((int) (j4 ^ (j4 >>> 32)))) * 31;
String str = this.description;
int i2 = 0;
int hashCode = (i + (str != null ? str.hashCode() : 0)) * 31;
@ -91,6 +99,8 @@ public final class GuildRoleSubscriptionGroupListing {
P.append(this.f1576id);
P.append(", guildId=");
P.append(this.guildId);
P.append(", applicationId=");
P.append(this.applicationId);
P.append(", imageAssetId=");
P.append(this.imageAssetId);
P.append(", description=");

View File

@ -7,6 +7,7 @@ import d0.z.d.m;
import java.util.List;
/* compiled from: GuildRoleSubscriptionTierListing.kt */
public final class GuildRoleSubscriptionTierListing {
private final long applicationId;
private final String description;
/* renamed from: id reason: collision with root package name */
@ -18,26 +19,26 @@ public final class GuildRoleSubscriptionTierListing {
private final long roleId;
private final List<SubscriptionPlan> subscriptionPlans;
public final String a() {
public final long a() {
return this.applicationId;
}
public final String b() {
return this.description;
}
public final long b() {
public final long c() {
return this.f1577id;
}
public final Long c() {
public final Long d() {
return this.imageAssetId;
}
public final String d() {
public final String e() {
return this.name;
}
public final boolean e() {
return this.published;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
@ -46,24 +47,25 @@ public final class GuildRoleSubscriptionTierListing {
return false;
}
GuildRoleSubscriptionTierListing guildRoleSubscriptionTierListing = (GuildRoleSubscriptionTierListing) obj;
return this.f1577id == guildRoleSubscriptionTierListing.f1577id && m.areEqual(this.name, guildRoleSubscriptionTierListing.name) && this.published == guildRoleSubscriptionTierListing.published && m.areEqual(this.description, guildRoleSubscriptionTierListing.description) && m.areEqual(this.imageAssetId, guildRoleSubscriptionTierListing.imageAssetId) && m.areEqual(this.subscriptionPlans, guildRoleSubscriptionTierListing.subscriptionPlans) && m.areEqual(this.roleBenefits, guildRoleSubscriptionTierListing.roleBenefits) && this.roleId == guildRoleSubscriptionTierListing.roleId;
return this.f1577id == guildRoleSubscriptionTierListing.f1577id && this.applicationId == guildRoleSubscriptionTierListing.applicationId && m.areEqual(this.name, guildRoleSubscriptionTierListing.name) && this.published == guildRoleSubscriptionTierListing.published && m.areEqual(this.description, guildRoleSubscriptionTierListing.description) && m.areEqual(this.imageAssetId, guildRoleSubscriptionTierListing.imageAssetId) && m.areEqual(this.subscriptionPlans, guildRoleSubscriptionTierListing.subscriptionPlans) && m.areEqual(this.roleBenefits, guildRoleSubscriptionTierListing.roleBenefits) && this.roleId == guildRoleSubscriptionTierListing.roleId;
}
public final GuildRoleSubscriptionRoleBenefits f() {
public final boolean f() {
return this.published;
}
public final GuildRoleSubscriptionRoleBenefits g() {
return this.roleBenefits;
}
public final long g() {
public final long h() {
return this.roleId;
}
public final List<SubscriptionPlan> h() {
return this.subscriptionPlans;
}
public int hashCode() {
long j = this.f1577id;
int i = ((int) (j ^ (j >>> 32))) * 31;
long j2 = this.applicationId;
int i = ((((int) (j ^ (j >>> 32))) * 31) + ((int) (j2 ^ (j2 >>> 32)))) * 31;
String str = this.name;
int i2 = 0;
int hashCode = (i + (str != null ? str.hashCode() : 0)) * 31;
@ -85,13 +87,19 @@ public final class GuildRoleSubscriptionTierListing {
if (guildRoleSubscriptionRoleBenefits != null) {
i2 = guildRoleSubscriptionRoleBenefits.hashCode();
}
long j2 = this.roleId;
return ((hashCode4 + i2) * 31) + ((int) (j2 ^ (j2 >>> 32)));
long j3 = this.roleId;
return ((hashCode4 + i2) * 31) + ((int) (j3 ^ (j3 >>> 32)));
}
public final List<SubscriptionPlan> i() {
return this.subscriptionPlans;
}
public String toString() {
StringBuilder P = a.P("GuildRoleSubscriptionTierListing(id=");
P.append(this.f1577id);
P.append(", applicationId=");
P.append(this.applicationId);
P.append(", name=");
P.append(this.name);
P.append(", published=");

View File

@ -55,7 +55,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
@ -144,7 +143,6 @@ public final class StoreAnalytics extends Store {
public final /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
public static final /* synthetic */ int[] $EnumSwitchMapping$1;
static {
FeedbackIssue.values();
@ -158,11 +156,6 @@ public final class StoreAnalytics extends Store {
iArr[FeedbackIssue.STREAM_REPORT_ENDED_AUDIO_POOR.ordinal()] = 6;
iArr[FeedbackIssue.STREAM_REPORT_ENDED_STREAM_STOPPED_UNEXPECTEDLY.ordinal()] = 7;
iArr[FeedbackIssue.OTHER.ordinal()] = 8;
EmojiPickerContextType.values();
int[] iArr2 = new int[2];
$EnumSwitchMapping$1 = iArr2;
iArr2[EmojiPickerContextType.GLOBAL.ordinal()] = 1;
iArr2[EmojiPickerContextType.CHAT.ordinal()] = 2;
}
}
@ -213,14 +206,13 @@ public final class StoreAnalytics extends Store {
private final void emojiPickerUpsellViewed(AnalyticsTracker.PremiumUpsellType premiumUpsellType, EmojiPickerContextType emojiPickerContextType, Map<String, ? extends Object> map) {
String str;
int ordinal = emojiPickerContextType.ordinal();
if (ordinal == 0) {
if (m.areEqual(emojiPickerContextType, EmojiPickerContextType.Global.INSTANCE)) {
str = "Custom Status Modal";
} else if (m.areEqual(emojiPickerContextType, EmojiPickerContextType.Chat.INSTANCE)) {
Channel channel = this.stores.getChannels$app_productionCanaryRelease().getChannel(this.stores.getChannelsSelected$app_productionCanaryRelease().getId());
str = (channel == null || channel.f() != 0) ? Traits.Location.Page.GUILD_CHANNEL : "DM Channel";
} else if (ordinal == 1) {
str = "Custom Status Modal";
} else {
throw new NoWhenBranchMatchedException();
str = "";
}
AnalyticsTracker.premiumUpsellViewed$default(AnalyticsTracker.INSTANCE, premiumUpsellType, new Traits.Location((String) KotlinExtensionsKt.getExhaustive(str), Traits.Location.Section.EMOJI_PICKER_POPOUT, Traits.Location.Obj.BUTTON_UPSELL, Traits.Location.ObjType.SEARCH, null, 16, null), h0.plus(map, o.to("has_search_query", Boolean.TRUE)), null, 8, null);
}

View File

@ -28,9 +28,13 @@ public final class StoreEmoji$buildUsableEmojiSet$1 extends o implements Functio
return false;
}
} else if (!(emojiContext instanceof StoreEmoji.EmojiContext.Global)) {
if (!(emojiContext instanceof StoreEmoji.EmojiContext.GuildProfile)) {
if (emojiContext instanceof StoreEmoji.EmojiContext.GuildProfile) {
if (((StoreEmoji.EmojiContext.GuildProfile) emojiContext).getGuildId() == j) {
return false;
}
} else if (!(emojiContext instanceof StoreEmoji.EmojiContext.Guild)) {
throw new NoWhenBranchMatchedException();
} else if (((StoreEmoji.EmojiContext.GuildProfile) emojiContext).getGuildId() == j) {
} else if (((StoreEmoji.EmojiContext.Guild) emojiContext).getGuildId() == j) {
return false;
}
}

View File

@ -23,6 +23,7 @@ public final class StoreEmoji$buildUsableEmojiSet$2 extends o implements Functio
}
public final boolean invoke(boolean z2) {
return (this.$emojiContext instanceof StoreEmoji.EmojiContext.Chat) && z2 && !this.$hasExternalEmojiPermission;
StoreEmoji.EmojiContext emojiContext = this.$emojiContext;
return ((emojiContext instanceof StoreEmoji.EmojiContext.Chat) || (emojiContext instanceof StoreEmoji.EmojiContext.Guild)) && z2 && !this.$hasExternalEmojiPermission;
}
}

View File

@ -139,6 +139,50 @@ public final class StoreEmoji implements Rules.EmojiDataProvider {
}
}
/* compiled from: StoreEmoji.kt */
public static final class Guild extends EmojiContext {
private final long guildId;
public Guild(long j) {
super(null);
this.guildId = j;
}
public static /* synthetic */ Guild copy$default(Guild guild, long j, int i, Object obj) {
if ((i & 1) != 0) {
j = guild.guildId;
}
return guild.copy(j);
}
public final long component1() {
return this.guildId;
}
public final Guild copy(long j) {
return new Guild(j);
}
public boolean equals(Object obj) {
if (this != obj) {
return (obj instanceof Guild) && this.guildId == ((Guild) obj).guildId;
}
return true;
}
public final long getGuildId() {
return this.guildId;
}
public int hashCode() {
return b.a(this.guildId);
}
public String toString() {
return a.A(a.P("Guild(guildId="), this.guildId, ")");
}
}
/* compiled from: StoreEmoji.kt */
public static final class GuildProfile extends EmojiContext {
private final long guildId;
@ -423,7 +467,7 @@ public final class StoreEmoji implements Rules.EmojiDataProvider {
return X;
}
}
observable = new j(Boolean.TRUE);
observable = emojiContext instanceof EmojiContext.Guild ? new j(Boolean.FALSE) : new j(Boolean.TRUE);
Observable<EmojiSet> X = Observable.h(StoreUser.observeMe$default(this.userStore, false, 1, null).F(StoreEmoji$getEmojiSet$1.INSTANCE), observable, this.sortedGuildsStore.observeOrderedGuilds().F(StoreEmoji$getEmojiSet$2.INSTANCE), this.mediaFavoritesStore.observeFavorites(StoreMediaFavorites.Favorite.Companion.getEmojiTypes()), StoreEmoji$getEmojiSet$3.INSTANCE).r().X(new StoreEmoji$getEmojiSet$4(this, emojiContext, z3, z2));
m.checkNotNullExpressionValue(X, "Observable\n .comb… }\n }");
return X;

View File

@ -30,22 +30,22 @@ public final class StoreGuildRoleSubscriptions$handleGuildRoleSubscriptionGroupF
StoreGuildRoleSubscriptions.access$getGuildRoleSubscriptionGroups$p(this.this$0).put(Long.valueOf(this.$guildId), new StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState.Loaded(this.$guildRoleSubscriptionGroupListing));
StoreGuildRoleSubscriptions.access$getGuildRoleSubscriptionTiers$p(this.this$0).remove(Long.valueOf(this.$guildId));
} else {
StoreGuildRoleSubscriptions.access$getGuildRoleSubscriptionGroups$p(this.this$0).put(Long.valueOf(this.$guildId), new StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState.Loaded(GuildRoleSubscriptionGroupListing.a(this.$guildRoleSubscriptionGroupListing, 0, 0, 0, null, null, null, 31)));
List<Long> e = this.$guildRoleSubscriptionGroupListing.e();
if (e == null || e.isEmpty()) {
StoreGuildRoleSubscriptions.access$getGuildRoleSubscriptionGroups$p(this.this$0).put(Long.valueOf(this.$guildId), new StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState.Loaded(GuildRoleSubscriptionGroupListing.a(this.$guildRoleSubscriptionGroupListing, 0, 0, 0, 0, null, null, null, 63)));
List<Long> f = this.$guildRoleSubscriptionGroupListing.f();
if (f == null || f.isEmpty()) {
StoreGuildRoleSubscriptions.access$getGuildRoleSubscriptionTiers$p(this.this$0).remove(Long.valueOf(this.$guildId));
} else {
Map map = (Map) StoreGuildRoleSubscriptions.access$getGuildRoleSubscriptionTiers$p(this.this$0).get(Long.valueOf(this.$guildId));
if (map == null) {
map = new LinkedHashMap();
}
List<GuildRoleSubscriptionTierListing> f = this.$guildRoleSubscriptionGroupListing.f();
if (f != null) {
for (GuildRoleSubscriptionTierListing guildRoleSubscriptionTierListing : f) {
map.put(Long.valueOf(guildRoleSubscriptionTierListing.b()), guildRoleSubscriptionTierListing);
List<GuildRoleSubscriptionTierListing> g = this.$guildRoleSubscriptionGroupListing.g();
if (g != null) {
for (GuildRoleSubscriptionTierListing guildRoleSubscriptionTierListing : g) {
map.put(Long.valueOf(guildRoleSubscriptionTierListing.c()), guildRoleSubscriptionTierListing);
}
}
StoreGuildRoleSubscriptions.access$getGuildRoleSubscriptionTiers$p(this.this$0).put(Long.valueOf(this.$guildRoleSubscriptionGroupListing.c()), map);
StoreGuildRoleSubscriptions.access$getGuildRoleSubscriptionTiers$p(this.this$0).put(Long.valueOf(this.$guildRoleSubscriptionGroupListing.d()), map);
}
}
this.this$0.markChanged();

View File

@ -27,7 +27,7 @@ public final class StoreGuildRoleSubscriptions$handleGuildRoleSubscriptionTierLi
if (map == null) {
map = new LinkedHashMap();
}
map.put(Long.valueOf(this.$guildRoleSubscriptionTierListing.b()), this.$guildRoleSubscriptionTierListing);
map.put(Long.valueOf(this.$guildRoleSubscriptionTierListing.c()), this.$guildRoleSubscriptionTierListing);
StoreGuildRoleSubscriptions.access$getGuildRoleSubscriptionTiers$p(this.this$0).put(Long.valueOf(this.$guildId), map);
this.this$0.markChanged();
}

View File

@ -299,7 +299,7 @@ public final class StoreGuildRoleSubscriptions extends StoreV2 {
public final GuildRoleSubscriptionGroupState getGuildRoleSubscriptionState(long j) {
ArrayList arrayList;
List<Long> e;
List<Long> f;
GuildRoleSubscriptionGroupState guildRoleSubscriptionGroupState = (GuildRoleSubscriptionGroupState) this.guildRoleSubscriptionGroupsSnapshot.get(Long.valueOf(j));
GuildRoleSubscriptionGroupListing guildRoleSubscriptionGroupListing = null;
if (guildRoleSubscriptionGroupState == null) {
@ -309,11 +309,11 @@ public final class StoreGuildRoleSubscriptions extends StoreV2 {
return guildRoleSubscriptionGroupState;
}
GuildRoleSubscriptionGroupListing guildRoleSubscriptionGroupListing2 = ((GuildRoleSubscriptionGroupState.Loaded) guildRoleSubscriptionGroupState).getGuildRoleSubscriptionGroupListing();
if (guildRoleSubscriptionGroupListing2 == null || (e = guildRoleSubscriptionGroupListing2.e()) == null) {
if (guildRoleSubscriptionGroupListing2 == null || (f = guildRoleSubscriptionGroupListing2.f()) == null) {
arrayList = n.emptyList();
} else {
ArrayList arrayList2 = new ArrayList();
for (Number number : e) {
for (Number number : f) {
long longValue = number.longValue();
Map map = (Map) this.guildRoleSubscriptionTiersSnapshot.get(Long.valueOf(j));
GuildRoleSubscriptionTierListing guildRoleSubscriptionTierListing = map != null ? (GuildRoleSubscriptionTierListing) map.get(Long.valueOf(longValue)) : null;
@ -324,7 +324,7 @@ public final class StoreGuildRoleSubscriptions extends StoreV2 {
arrayList = arrayList2;
}
if (guildRoleSubscriptionGroupListing2 != null) {
guildRoleSubscriptionGroupListing = GuildRoleSubscriptionGroupListing.a(guildRoleSubscriptionGroupListing2, 0, 0, 0, null, null, arrayList, 31);
guildRoleSubscriptionGroupListing = GuildRoleSubscriptionGroupListing.a(guildRoleSubscriptionGroupListing2, 0, 0, 0, 0, null, null, arrayList, 63);
}
return new GuildRoleSubscriptionGroupState.Loaded(guildRoleSubscriptionGroupListing);
}

View File

@ -1,6 +1,81 @@
package com.discord.widgets.chat.input.emoji;
import a0.a.a.b;
import c.d.b.a.a;
import java.io.Serializable;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: EmojiPickerContextType.kt */
public enum EmojiPickerContextType {
CHAT,
GLOBAL
public abstract class EmojiPickerContextType implements Serializable {
/* compiled from: EmojiPickerContextType.kt */
public static final class Chat extends EmojiPickerContextType {
public static final Chat INSTANCE = new Chat();
private Chat() {
super(null);
}
}
/* compiled from: EmojiPickerContextType.kt */
public static final class Global extends EmojiPickerContextType {
public static final Global INSTANCE = new Global();
private Global() {
super(null);
}
}
/* compiled from: EmojiPickerContextType.kt */
public static final class Guild extends EmojiPickerContextType {
private final long guildId;
public Guild(long j) {
super(null);
this.guildId = j;
}
public static /* synthetic */ Guild copy$default(Guild guild, long j, int i, Object obj) {
if ((i & 1) != 0) {
j = guild.guildId;
}
return guild.copy(j);
}
public final long component1() {
return this.guildId;
}
public final Guild copy(long j) {
return new Guild(j);
}
@Override // java.lang.Object
public boolean equals(Object obj) {
if (this != obj) {
return (obj instanceof Guild) && this.guildId == ((Guild) obj).guildId;
}
return true;
}
public final long getGuildId() {
return this.guildId;
}
@Override // java.lang.Object
public int hashCode() {
return b.a(this.guildId);
}
@Override // java.lang.Object
public String toString() {
return a.A(a.P("Guild(guildId="), this.guildId, ")");
}
}
private EmojiPickerContextType() {
}
public /* synthetic */ EmojiPickerContextType(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}

View File

@ -24,6 +24,7 @@ import com.discord.utilities.analytics.Traits;
import com.discord.utilities.mg_recycler.MGRecyclerDataPayload;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.widgets.chat.input.emoji.EmojiCategoryItem;
import com.discord.widgets.chat.input.emoji.EmojiPickerContextType;
import com.discord.widgets.chat.input.emoji.WidgetEmojiAdapter;
import d0.f0.q;
import d0.g;
@ -286,17 +287,6 @@ public class EmojiPickerViewModel extends AppViewModel<ViewState> {
}
}
public final /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
EmojiPickerContextType.values();
int[] iArr = new int[2];
$EnumSwitchMapping$0 = iArr;
iArr[EmojiPickerContextType.GLOBAL.ordinal()] = 1;
}
}
private Companion() {
}
@ -349,14 +339,19 @@ public class EmojiPickerViewModel extends AppViewModel<ViewState> {
}
private final Observable<StoreEmoji.EmojiContext> getEmojiContextObservable(EmojiPickerContextType emojiPickerContextType, StoreChannelsSelected storeChannelsSelected) {
if (emojiPickerContextType.ordinal() != 1) {
if (m.areEqual(emojiPickerContextType, EmojiPickerContextType.Global.INSTANCE)) {
j jVar = new j(StoreEmoji.EmojiContext.Global.INSTANCE);
m.checkNotNullExpressionValue(jVar, "Observable.just(\n …ontext.Global\n )");
return jVar;
} else if (emojiPickerContextType instanceof EmojiPickerContextType.Guild) {
j jVar2 = new j(new StoreEmoji.EmojiContext.Guild(((EmojiPickerContextType.Guild) emojiPickerContextType).getGuildId()));
m.checkNotNullExpressionValue(jVar2, "Observable.just(\n …pe.guildId)\n )");
return jVar2;
} else {
Observable<R> F = storeChannelsSelected.observeResolvedSelectedChannel().F(EmojiPickerViewModel$Companion$getEmojiContextObservable$1.INSTANCE);
m.checkNotNullExpressionValue(F, "storeChannelsSelected.ob… }\n }");
return F;
}
j jVar = new j(StoreEmoji.EmojiContext.Global.INSTANCE);
m.checkNotNullExpressionValue(jVar, "Observable.just(\n …ontext.Global\n )");
return jVar;
}
public static /* synthetic */ Observable getEmojiContextObservable$default(Companion companion, EmojiPickerContextType emojiPickerContextType, StoreChannelsSelected storeChannelsSelected, int i, Object obj) {

View File

@ -305,7 +305,7 @@ public final class WidgetExpressionTray extends AppFragment implements c {
AnalyticsTracker.INSTANCE.chatInputComponentViewed(ChatInputComponentTypes.EMOJI_SEARCH);
FragmentManager parentFragmentManager = getParentFragmentManager();
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
EmojiPickerNavigator.launchBottomSheet$default(parentFragmentManager, this.emojiPickerListener, EmojiPickerContextType.CHAT, null, 8, null);
EmojiPickerNavigator.launchBottomSheet$default(parentFragmentManager, this.emojiPickerListener, EmojiPickerContextType.Chat.INSTANCE, null, 8, null);
} else if (m.areEqual(event, ExpressionTrayViewModel.Event.ShowGifPickerSheet.INSTANCE)) {
AnalyticsTracker.INSTANCE.chatInputComponentViewed(ChatInputComponentTypes.GIF_SEARCH);
WidgetGifPickerSheet.Companion companion = WidgetGifPickerSheet.Companion;
@ -412,7 +412,7 @@ public final class WidgetExpressionTray extends AppFragment implements c {
widgetEmojiPicker.setOnBackspacePressedListener(this.onBackspacePressedListener);
Bundle bundle = new Bundle();
bundle.putSerializable("MODE", EmojiPickerMode.INLINE);
bundle.putSerializable(EmojiPickerNavigator.ARG_EMOJI_PICKER_CONTEXT_TYPE, EmojiPickerContextType.CHAT);
bundle.putSerializable(EmojiPickerNavigator.ARG_EMOJI_PICKER_CONTEXT_TYPE, EmojiPickerContextType.Chat.INSTANCE);
widgetEmojiPicker.setArguments(bundle);
String simpleName = WidgetEmojiPicker.class.getSimpleName();
m.checkNotNullExpressionValue(simpleName, "emojiPickerFragment.javaClass.simpleName");

View File

@ -58,6 +58,6 @@ public final class WidgetChatListActions$onViewCreated$2 extends o implements Fu
public final void mo1invoke() {
FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager();
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
EmojiPickerNavigator.launchBottomSheet(parentFragmentManager, new AnonymousClass1(this), EmojiPickerContextType.CHAT, new AnonymousClass2(this));
EmojiPickerNavigator.launchBottomSheet(parentFragmentManager, new AnonymousClass1(this), EmojiPickerContextType.Chat.INSTANCE, new AnonymousClass2(this));
}
}

View File

@ -44,6 +44,6 @@ public final class WidgetChatListAdapterEventsHandler$onQuickAddReactionClicked$
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
EmojiPickerNavigator.launchBottomSheet$default(WidgetChatListAdapterEventsHandler.access$getFragmentManager$p(this.this$0), new AnonymousClass1(this), EmojiPickerContextType.CHAT, null, 8, null);
EmojiPickerNavigator.launchBottomSheet$default(WidgetChatListAdapterEventsHandler.access$getFragmentManager$p(this.this$0), new AnonymousClass1(this), EmojiPickerContextType.Chat.INSTANCE, null, 8, null);
}
}

View File

@ -8,6 +8,7 @@ import android.widget.ImageView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import com.discord.databinding.ViewGuildRoleSubscriptionPlanDetailsBinding;
import com.discord.utilities.icon.IconUtils;
import com.discord.utilities.images.MGImages;
import com.discord.utilities.view.extensions.ViewExtensions;
import com.discord.utilities.view.text.TextWatcherKt;
@ -99,13 +100,8 @@ public final class GuildRoleSubscriptionPlanDetailsView extends ConstraintLayout
TextWatcherKt.addLifecycleAwareTextWatcher(textInputEditText, fragment, function1);
}
public final void configureUI(String str, long j) {
TextInputLayout textInputLayout = this.binding.d;
m.checkNotNullExpressionValue(textInputLayout, "binding.guildRoleSubscriptionPlanDescriptionLayout");
ViewExtensions.setTextIfDifferent(textInputLayout, str);
ImageView imageView = this.binding.e;
m.checkNotNullExpressionValue(imageView, "binding.guildSubscriptionPlanDetailsEditCoverImage");
imageView.setVisibility(0);
public final void configureUI(String str, long j, long j2) {
configureUI(str, IconUtils.getAssetImage$default(IconUtils.INSTANCE, Long.valueOf(j), String.valueOf(j2), 0, 4, null));
}
public final void configureUI(String str, String str2) {

View File

@ -41,6 +41,6 @@ public final class GuildRoleSubscriptionUtils$createGuildRoleSubscriptionGroupLi
long j = this.$guildId;
m.checkNotNullExpressionValue(guildRoleSubscriptionGroupListing, "subscriptionGroupListing");
storeGuildRoleSubscriptions.handleGuildRoleSubscriptionGroupUpdate(j, guildRoleSubscriptionGroupListing);
return GuildRoleSubscriptionUtils.INSTANCE.createGuildRoleSubscriptionTierListing(this.$restApi, this.$storeGuildRoleSubscriptions, this.$guildId, guildRoleSubscriptionGroupListing.c(), this.$tierName, this.$tierDescription, this.$priceTier, this.$tierImage, this.$memberColor, this.$memberBadge, this.$channelBenefits, this.$intangibleBenefits);
return GuildRoleSubscriptionUtils.INSTANCE.createGuildRoleSubscriptionTierListing(this.$restApi, this.$storeGuildRoleSubscriptions, this.$guildId, guildRoleSubscriptionGroupListing.d(), this.$tierName, this.$tierDescription, this.$priceTier, this.$tierImage, this.$memberColor, this.$memberBadge, this.$channelBenefits, this.$intangibleBenefits);
}
}

View File

@ -15,6 +15,7 @@ import com.discord.databinding.ViewGuildRoleSubscriptionImageUploadBinding;
import com.discord.utilities.color.ColorCompat;
import com.discord.utilities.drawable.DrawableCompat;
import com.discord.utilities.icon.IconUtils;
import com.discord.widgets.guild_role_subscriptions.tier.model.GuildRoleSubscriptionTier;
import com.facebook.drawee.drawable.ScalingUtils$ScaleType;
import com.facebook.drawee.generic.GenericDraweeHierarchy;
import com.facebook.drawee.view.SimpleDraweeView;
@ -150,14 +151,11 @@ public final class GuildSubscriptionRoleImageUploadView extends ConstraintLayout
guildSubscriptionRoleImageUploadView.initialize(attributeSet);
}
public final void configureUI(Function0<Unit> function0, Function0<Unit> function02) {
m.checkNotNullParameter(function0, "onImageRemoved");
m.checkNotNullParameter(function02, "onImageChooserClicked");
this.onImageRemovedListener = function0;
this.onImageChooserClickListener = function02;
private final void updateImage(Long l, long j) {
updateImage(IconUtils.INSTANCE.getAssetImage(l, String.valueOf(j), this.avatarSize));
}
public final void updateImage(String str) {
private final void updateImage(String str) {
SimpleDraweeView simpleDraweeView = this.binding.f1685c;
m.checkNotNullExpressionValue(simpleDraweeView, "binding.guildSubscriptionImage");
int i = this.avatarSize;
@ -170,4 +168,21 @@ public final class GuildSubscriptionRoleImageUploadView extends ConstraintLayout
}
imageView.setVisibility(i2);
}
public final void configureUI(Function0<Unit> function0, Function0<Unit> function02) {
m.checkNotNullParameter(function0, "onImageRemoved");
m.checkNotNullParameter(function02, "onImageChooserClicked");
this.onImageRemovedListener = function0;
this.onImageChooserClickListener = function02;
}
public final void updateImage(GuildRoleSubscriptionTier guildRoleSubscriptionTier) {
m.checkNotNullParameter(guildRoleSubscriptionTier, "guildSubscriptionTier");
String image = guildRoleSubscriptionTier.getImage();
if (!(image == null || t.isBlank(image)) || guildRoleSubscriptionTier.getImageAssetId() == null) {
updateImage(guildRoleSubscriptionTier.getImage());
} else {
updateImage(guildRoleSubscriptionTier.getApplicationId(), guildRoleSubscriptionTier.getImageAssetId().longValue());
}
}
}

View File

@ -2,7 +2,6 @@ package com.discord.widgets.guild_role_subscriptions.setup;
import android.content.Context;
import androidx.annotation.MainThread;
import androidx.media.AudioAttributesCompat;
import c.d.b.a.a;
import com.discord.app.AppViewModel;
import com.discord.stores.StoreGuildRoleSubscriptions;
@ -142,7 +141,7 @@ public final class GuildRoleSubscriptionPlanSetupViewModel extends AppViewModel<
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ ViewState(int i, int i2, boolean z2, boolean z3, String str, String str2, GuildRoleSubscriptionTier guildRoleSubscriptionTier, int i3, DefaultConstructorMarker defaultConstructorMarker) {
this((i3 & 1) != 0 ? 0 : i, (i3 & 2) != 0 ? 1 : i2, (i3 & 4) != 0 ? false : z2, (i3 & 8) == 0 ? z3 : false, (i3 & 16) != 0 ? null : str, (i3 & 32) == 0 ? str2 : null, (i3 & 64) != 0 ? new GuildRoleSubscriptionTier(null, null, null, null, null, null, null, null, null, null, AudioAttributesCompat.FLAG_ALL, null) : guildRoleSubscriptionTier);
this((i3 & 1) != 0 ? 0 : i, (i3 & 2) != 0 ? 1 : i2, (i3 & 4) != 0 ? false : z2, (i3 & 8) == 0 ? z3 : false, (i3 & 16) != 0 ? null : str, (i3 & 32) == 0 ? str2 : null, (i3 & 64) != 0 ? new GuildRoleSubscriptionTier(null, null, null, null, null, null, null, null, null, null, null, 2047, null) : guildRoleSubscriptionTier);
}
public static /* synthetic */ ViewState copy$default(ViewState viewState, int i, int i2, boolean z2, boolean z3, String str, String str2, GuildRoleSubscriptionTier guildRoleSubscriptionTier, int i3, Object obj) {

View File

@ -1,7 +1,5 @@
package com.discord.widgets.guild_role_subscriptions.tier.create;
import androidx.core.app.FrameMetricsAggregator;
import androidx.core.view.PointerIconCompat;
import androidx.media.AudioAttributesCompat;
import c.d.b.a.a;
import com.discord.app.AppViewModel;
@ -31,7 +29,7 @@ public final class GuildRoleSubscriptionTierViewModel extends AppViewModel<ViewS
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ ViewState(GuildRoleSubscriptionTier guildRoleSubscriptionTier, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? new GuildRoleSubscriptionTier(null, null, null, null, null, null, null, null, null, null, AudioAttributesCompat.FLAG_ALL, null) : guildRoleSubscriptionTier);
this((i & 1) != 0 ? new GuildRoleSubscriptionTier(null, null, null, null, null, null, null, null, null, null, null, 2047, null) : guildRoleSubscriptionTier);
}
public static /* synthetic */ ViewState copy$default(ViewState viewState, GuildRoleSubscriptionTier guildRoleSubscriptionTier, int i, Object obj) {
@ -83,22 +81,22 @@ public final class GuildRoleSubscriptionTierViewModel extends AppViewModel<ViewS
private final void addChannelBenefit(Benefit.ChannelBenefit channelBenefit) {
GuildRoleSubscriptionTier guildRoleSubscriptionTier = requireViewState().getGuildRoleSubscriptionTier();
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, u.plus((Collection<? extends Benefit.ChannelBenefit>) guildRoleSubscriptionTier.getChannelBenefits(), channelBenefit), null, 767, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, null, u.plus((Collection<? extends Benefit.ChannelBenefit>) guildRoleSubscriptionTier.getChannelBenefits(), channelBenefit), null, 1535, null)));
}
private final void addIntangibleBenefit(Benefit.IntangibleBenefit intangibleBenefit) {
GuildRoleSubscriptionTier guildRoleSubscriptionTier = requireViewState().getGuildRoleSubscriptionTier();
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, null, u.plus((Collection<? extends Benefit.IntangibleBenefit>) guildRoleSubscriptionTier.getIntangibleBenefits(), intangibleBenefit), FrameMetricsAggregator.EVERY_DURATION, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, null, null, u.plus((Collection<? extends Benefit.IntangibleBenefit>) guildRoleSubscriptionTier.getIntangibleBenefits(), intangibleBenefit), AudioAttributesCompat.FLAG_ALL, null)));
}
private final void removeChannelBenefit(Benefit.ChannelBenefit channelBenefit) {
GuildRoleSubscriptionTier guildRoleSubscriptionTier = requireViewState().getGuildRoleSubscriptionTier();
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, u.minus(guildRoleSubscriptionTier.getChannelBenefits(), channelBenefit), null, 767, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, null, u.minus(guildRoleSubscriptionTier.getChannelBenefits(), channelBenefit), null, 1535, null)));
}
private final void removeIntangibleBenefit(Benefit.IntangibleBenefit intangibleBenefit) {
GuildRoleSubscriptionTier guildRoleSubscriptionTier = requireViewState().getGuildRoleSubscriptionTier();
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, null, u.minus(guildRoleSubscriptionTier.getIntangibleBenefits(), intangibleBenefit), FrameMetricsAggregator.EVERY_DURATION, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, null, null, u.minus(guildRoleSubscriptionTier.getIntangibleBenefits(), intangibleBenefit), AudioAttributesCompat.FLAG_ALL, null)));
}
private final void replaceChannelBenefit(Benefit.ChannelBenefit channelBenefit, Benefit.ChannelBenefit channelBenefit2) {
@ -107,7 +105,7 @@ public final class GuildRoleSubscriptionTierViewModel extends AppViewModel<ViewS
int indexOf = mutableList.indexOf(channelBenefit);
if (indexOf != -1) {
mutableList.set(indexOf, channelBenefit2);
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, mutableList, null, 767, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, null, mutableList, null, 1535, null)));
}
}
@ -117,7 +115,7 @@ public final class GuildRoleSubscriptionTierViewModel extends AppViewModel<ViewS
int indexOf = mutableList.indexOf(intangibleBenefit);
if (indexOf != -1) {
mutableList.set(indexOf, intangibleBenefit2);
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, null, mutableList, FrameMetricsAggregator.EVERY_DURATION, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, null, null, null, null, null, mutableList, AudioAttributesCompat.FLAG_ALL, null)));
}
}
@ -152,13 +150,13 @@ public final class GuildRoleSubscriptionTierViewModel extends AppViewModel<ViewS
public final void updateDescription(String str) {
m.checkNotNullParameter(str, ModelAuditLogEntry.CHANGE_KEY_DESCRIPTION);
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(requireViewState().getGuildRoleSubscriptionTier(), null, null, null, null, null, null, str, null, null, null, 959, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(requireViewState().getGuildRoleSubscriptionTier(), null, null, null, null, null, null, null, str, null, null, null, 1919, null)));
}
public final void updateImage(String str) {
GuildRoleSubscriptionTier guildRoleSubscriptionTier = requireViewState().getGuildRoleSubscriptionTier();
requireViewState();
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, str, null, null, null, null, null, PointerIconCompat.TYPE_CROSSHAIR, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(guildRoleSubscriptionTier, null, null, null, null, null, str, null, null, null, null, null, 2015, null)));
}
public final void updateIntangibleBenefit(Benefit.IntangibleBenefit intangibleBenefit, Benefit.IntangibleBenefit intangibleBenefit2) {
@ -172,19 +170,19 @@ public final class GuildRoleSubscriptionTierViewModel extends AppViewModel<ViewS
}
public final void updateMemberBadge(String str) {
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(requireViewState().getGuildRoleSubscriptionTier(), null, null, null, str, null, null, null, null, null, null, PointerIconCompat.TYPE_VERTICAL_DOUBLE_ARROW, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(requireViewState().getGuildRoleSubscriptionTier(), null, null, null, null, str, null, null, null, null, null, null, 2031, null)));
}
public final void updateMemberColor(Integer num) {
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(requireViewState().getGuildRoleSubscriptionTier(), null, null, num, null, null, null, null, null, null, null, PointerIconCompat.TYPE_ZOOM_OUT, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(requireViewState().getGuildRoleSubscriptionTier(), null, null, null, num, null, null, null, null, null, null, null, 2039, null)));
}
public final void updatePriceTier(int i) {
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(requireViewState().getGuildRoleSubscriptionTier(), null, Integer.valueOf(i), null, null, null, null, null, null, null, null, PointerIconCompat.TYPE_GRABBING, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(requireViewState().getGuildRoleSubscriptionTier(), null, null, Integer.valueOf(i), null, null, null, null, null, null, null, null, 2043, null)));
}
public final void updateTierName(String str) {
m.checkNotNullParameter(str, "tierName");
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(requireViewState().getGuildRoleSubscriptionTier(), str, null, null, null, null, null, null, null, null, null, 1022, null)));
updateViewState(requireViewState().copy(GuildRoleSubscriptionTier.copy$default(requireViewState().getGuildRoleSubscriptionTier(), str, null, null, null, null, null, null, null, null, null, null, 2046, null)));
}
}

View File

@ -77,7 +77,7 @@ public final class WidgetGuildRoleSubscriptionTierDesign extends AppFragment {
private final void configureUI(GuildRoleSubscriptionTierViewModel.ViewState viewState) {
Integer memberColor = viewState.getGuildRoleSubscriptionTier().getMemberColor();
setupMemberColor(memberColor != null ? memberColor.intValue() : getDefaultColor());
getBinding().e.updateImage(viewState.getGuildRoleSubscriptionTier().getMemberBadge());
getBinding().e.updateImage(viewState.getGuildRoleSubscriptionTier());
}
private final WidgetGuildRoleSubscriptionTierDesignBinding getBinding() {

View File

@ -25,6 +25,7 @@ import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
import com.discord.widgets.guild_role_subscriptions.WidgetPriceTierPickerBottomSheet;
import com.discord.widgets.guild_role_subscriptions.tier.create.GuildRoleSubscriptionTierViewModel;
import com.discord.widgets.guild_role_subscriptions.tier.model.GuildRoleSubscriptionTier;
import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textfield.TextInputLayout;
import d0.g;
@ -85,19 +86,20 @@ public final class WidgetGuildRoleSubscriptionTierDetails extends AppFragment {
}
private final void configureUI(GuildRoleSubscriptionTierViewModel.ViewState viewState) {
GuildRoleSubscriptionTier guildRoleSubscriptionTier = viewState.getGuildRoleSubscriptionTier();
TextInputLayout textInputLayout = getBinding().f;
m.checkNotNullExpressionValue(textInputLayout, "binding.createSubscriptionTierNameLayout");
ViewExtensions.setTextIfDifferent(textInputLayout, viewState.getGuildRoleSubscriptionTier().getName());
ViewExtensions.setTextIfDifferent(textInputLayout, guildRoleSubscriptionTier.getName());
TextInputLayout textInputLayout2 = getBinding().f1868c;
m.checkNotNullExpressionValue(textInputLayout2, "binding.createSubscriptionTierDescriptionLayout");
ViewExtensions.setTextIfDifferent(textInputLayout2, viewState.getGuildRoleSubscriptionTier().getDescription());
getBinding().d.updateImage(viewState.getGuildRoleSubscriptionTier().getImage());
if (viewState.getGuildRoleSubscriptionTier().getPriceTier() == null) {
ViewExtensions.setTextIfDifferent(textInputLayout2, guildRoleSubscriptionTier.getDescription());
getBinding().d.updateImage(guildRoleSubscriptionTier);
if (guildRoleSubscriptionTier.getPriceTier() == null) {
getBinding().g.setText(R.string.guild_role_subscription_tier_detail_price_placeholder);
} else {
TextView textView = getBinding().g;
m.checkNotNullExpressionValue(textView, "binding.createSubscriptionTierPrice");
int intValue = viewState.getGuildRoleSubscriptionTier().getPriceTier().intValue();
int intValue = guildRoleSubscriptionTier.getPriceTier().intValue();
WidgetGuildRoleSubscriptionDetailsBinding binding = getBinding();
m.checkNotNullExpressionValue(binding, "binding");
ScrollView scrollView = binding.a;
@ -106,7 +108,7 @@ public final class WidgetGuildRoleSubscriptionTierDetails extends AppFragment {
m.checkNotNullExpressionValue(context, "binding.root.context");
textView.setText(PremiumUtilsKt.getFormattedPriceUsd(intValue, context));
}
if (m.areEqual(viewState.getGuildRoleSubscriptionTier().isPublished(), Boolean.TRUE)) {
if (m.areEqual(guildRoleSubscriptionTier.isPublished(), Boolean.TRUE)) {
TextView textView2 = getBinding().g;
m.checkNotNullExpressionValue(textView2, "binding.createSubscriptionTierPrice");
ViewExtensions.setCompoundDrawableWithIntrinsicBounds$default(textView2, 0, 0, R.drawable.ic_lock_white_a60_16dp, 0, 11, null);

View File

@ -20,7 +20,7 @@ public final class WidgetGuildRoleSubscriptionTierBenefits$itemClickListener$1 i
if (ordinal == 0) {
WidgetGuildRoleSubscriptionTierChannelBenefit.Companion.launch$default(WidgetGuildRoleSubscriptionTierChannelBenefit.Companion, this.this$0.requireContext(), WidgetGuildRoleSubscriptionTierBenefits.access$getChannelBenefitLauncher$p(this.this$0), WidgetGuildRoleSubscriptionTierBenefits.access$getGuildId$p(this.this$0), null, 8, null);
} else if (ordinal == 1) {
WidgetGuildRoleSubscriptionTierIntangibleBenefit.Companion.launch$default(WidgetGuildRoleSubscriptionTierIntangibleBenefit.Companion, this.this$0.requireContext(), WidgetGuildRoleSubscriptionTierBenefits.access$getIntangibleBenefitLauncher$p(this.this$0), null, 4, null);
WidgetGuildRoleSubscriptionTierIntangibleBenefit.Companion.launch$default(WidgetGuildRoleSubscriptionTierIntangibleBenefit.Companion, this.this$0.requireContext(), WidgetGuildRoleSubscriptionTierBenefits.access$getIntangibleBenefitLauncher$p(this.this$0), WidgetGuildRoleSubscriptionTierBenefits.access$getGuildId$p(this.this$0), null, 8, null);
}
}
@ -28,7 +28,7 @@ public final class WidgetGuildRoleSubscriptionTierBenefits$itemClickListener$1 i
public void onBenefitItemClick(GuildRoleSubscriptionBenefitAdapterItem guildRoleSubscriptionBenefitAdapterItem) {
m.checkNotNullParameter(guildRoleSubscriptionBenefitAdapterItem, "benefitAdapterItem");
if (guildRoleSubscriptionBenefitAdapterItem instanceof GuildRoleSubscriptionBenefitAdapterItem.IntangibleBenefitItem) {
WidgetGuildRoleSubscriptionTierIntangibleBenefit.Companion.launch(this.this$0.requireContext(), WidgetGuildRoleSubscriptionTierBenefits.access$getIntangibleBenefitLauncher$p(this.this$0), ((GuildRoleSubscriptionBenefitAdapterItem.IntangibleBenefitItem) guildRoleSubscriptionBenefitAdapterItem).getIntangibleBenefit());
WidgetGuildRoleSubscriptionTierIntangibleBenefit.Companion.launch(this.this$0.requireContext(), WidgetGuildRoleSubscriptionTierBenefits.access$getIntangibleBenefitLauncher$p(this.this$0), WidgetGuildRoleSubscriptionTierBenefits.access$getGuildId$p(this.this$0), ((GuildRoleSubscriptionBenefitAdapterItem.IntangibleBenefitItem) guildRoleSubscriptionBenefitAdapterItem).getIntangibleBenefit());
} else if (guildRoleSubscriptionBenefitAdapterItem instanceof GuildRoleSubscriptionBenefitAdapterItem.ChannelBenefitItem) {
WidgetGuildRoleSubscriptionTierChannelBenefit.Companion.launch(this.this$0.requireContext(), WidgetGuildRoleSubscriptionTierBenefits.access$getChannelBenefitLauncher$p(this.this$0), WidgetGuildRoleSubscriptionTierBenefits.access$getGuildId$p(this.this$0), ((GuildRoleSubscriptionBenefitAdapterItem.ChannelBenefitItem) guildRoleSubscriptionBenefitAdapterItem).getChannelBenefit());
}

View File

@ -35,6 +35,6 @@ public final class WidgetGuildRoleSubscriptionTierChannelBenefit$onViewBound$5 i
public final void onClick(View view) {
FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager();
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
EmojiPickerNavigator.launchBottomSheet$default(parentFragmentManager, new AnonymousClass1(this), EmojiPickerContextType.GLOBAL, null, 8, null);
EmojiPickerNavigator.launchBottomSheet$default(parentFragmentManager, new AnonymousClass1(this), new EmojiPickerContextType.Guild(WidgetGuildRoleSubscriptionTierChannelBenefit.access$getGuildId$p(this.this$0)), null, 8, null);
}
}

View File

@ -0,0 +1,22 @@
package com.discord.widgets.guild_role_subscriptions.tier.create.benefits.intangible;
import d0.z.d.o;
import kotlin.jvm.functions.Function0;
/* compiled from: WidgetGuildRoleSubscriptionTierIntangibleBenefit.kt */
public final class WidgetGuildRoleSubscriptionTierIntangibleBenefit$guildId$2 extends o implements Function0<Long> {
public final /* synthetic */ WidgetGuildRoleSubscriptionTierIntangibleBenefit this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetGuildRoleSubscriptionTierIntangibleBenefit$guildId$2(WidgetGuildRoleSubscriptionTierIntangibleBenefit widgetGuildRoleSubscriptionTierIntangibleBenefit) {
super(0);
this.this$0 = widgetGuildRoleSubscriptionTierIntangibleBenefit;
}
/* Return type fixed from 'long' to match base method */
/* JADX WARNING: Unknown variable types count: 1 */
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final Long mo1invoke() {
return this.this$0.getMostRecentIntent().getLongExtra("com.discord.intent.extra.EXTRA_GUILD_ID", -1);
}
}

View File

@ -35,6 +35,6 @@ public final class WidgetGuildRoleSubscriptionTierIntangibleBenefit$onViewBound$
public final void onClick(View view) {
FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager();
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
EmojiPickerNavigator.launchBottomSheet$default(parentFragmentManager, new AnonymousClass1(this), EmojiPickerContextType.GLOBAL, null, 8, null);
EmojiPickerNavigator.launchBottomSheet$default(parentFragmentManager, new AnonymousClass1(this), new EmojiPickerContextType.Guild(WidgetGuildRoleSubscriptionTierIntangibleBenefit.access$getGuildId$p(this.this$0)), null, 8, null);
}
}

View File

@ -51,6 +51,7 @@ public final class WidgetGuildRoleSubscriptionTierIntangibleBenefit extends AppF
private static final String RESULT_EXTRA_INTANGIBLE_BENEFIT = "RESULT_EXTRA_INTANGIBLE_BENEFIT";
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetGuildRoleSubscriptionTierIntangibleBenefit$binding$2.INSTANCE, null, 2, null);
private final Lazy existingIntangibleBenefit$delegate = g.lazy(new WidgetGuildRoleSubscriptionTierIntangibleBenefit$existingIntangibleBenefit$2(this));
private final Lazy guildId$delegate = g.lazy(new WidgetGuildRoleSubscriptionTierIntangibleBenefit$guildId$2(this));
private final Lazy viewModel$delegate;
/* compiled from: WidgetGuildRoleSubscriptionTierIntangibleBenefit.kt */
@ -62,19 +63,20 @@ public final class WidgetGuildRoleSubscriptionTierIntangibleBenefit extends AppF
this();
}
public static /* synthetic */ void launch$default(Companion companion, Context context, ActivityResultLauncher activityResultLauncher, Benefit.IntangibleBenefit intangibleBenefit, int i, Object obj) {
if ((i & 4) != 0) {
public static /* synthetic */ void launch$default(Companion companion, Context context, ActivityResultLauncher activityResultLauncher, long j, Benefit.IntangibleBenefit intangibleBenefit, int i, Object obj) {
if ((i & 8) != 0) {
intangibleBenefit = null;
}
companion.launch(context, activityResultLauncher, intangibleBenefit);
companion.launch(context, activityResultLauncher, j, intangibleBenefit);
}
public final void launch(Context context, ActivityResultLauncher<Intent> activityResultLauncher, Benefit.IntangibleBenefit intangibleBenefit) {
public final void launch(Context context, ActivityResultLauncher<Intent> activityResultLauncher, long j, Benefit.IntangibleBenefit intangibleBenefit) {
m.checkNotNullParameter(context, "context");
m.checkNotNullParameter(activityResultLauncher, "launcher");
j jVar = j.g;
Intent intent = new Intent();
intent.putExtra(WidgetGuildRoleSubscriptionTierIntangibleBenefit.INTENT_EXTRA_EXISTING_INTANGIBLE_BENEFIT, intangibleBenefit);
intent.putExtra("com.discord.intent.extra.EXTRA_GUILD_ID", j);
jVar.f(context, activityResultLauncher, WidgetGuildRoleSubscriptionTierIntangibleBenefit.class, intent);
}
@ -102,6 +104,10 @@ public final class WidgetGuildRoleSubscriptionTierIntangibleBenefit extends AppF
return widgetGuildRoleSubscriptionTierIntangibleBenefit.getExistingIntangibleBenefit();
}
public static final /* synthetic */ long access$getGuildId$p(WidgetGuildRoleSubscriptionTierIntangibleBenefit widgetGuildRoleSubscriptionTierIntangibleBenefit) {
return widgetGuildRoleSubscriptionTierIntangibleBenefit.getGuildId();
}
public static final /* synthetic */ GuildRoleSubscriptionTierIntangibleBenefitViewModel access$getViewModel$p(WidgetGuildRoleSubscriptionTierIntangibleBenefit widgetGuildRoleSubscriptionTierIntangibleBenefit) {
return widgetGuildRoleSubscriptionTierIntangibleBenefit.getViewModel();
}
@ -143,6 +149,10 @@ public final class WidgetGuildRoleSubscriptionTierIntangibleBenefit extends AppF
return (Benefit.IntangibleBenefit) this.existingIntangibleBenefit$delegate.getValue();
}
private final long getGuildId() {
return ((Number) this.guildId$delegate.getValue()).longValue();
}
private final GuildRoleSubscriptionTierIntangibleBenefitViewModel getViewModel() {
return (GuildRoleSubscriptionTierIntangibleBenefitViewModel) this.viewModel$delegate.getValue();
}

View File

@ -9,6 +9,8 @@ import com.discord.api.guildrolesubscription.GuildRoleSubscriptionBenefit;
import com.discord.api.guildrolesubscription.GuildRoleSubscriptionBenefitType;
import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.models.domain.emoji.Emoji;
import com.discord.models.domain.emoji.ModelEmojiCustom;
import com.discord.models.domain.emoji.ModelEmojiUnicode;
import d0.z.d.m;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: Benefit.kt */
@ -153,9 +155,22 @@ public abstract class Benefit implements Parcelable {
@Override // com.discord.widgets.guild_role_subscriptions.tier.model.Benefit
public GuildRoleSubscriptionBenefit toGuildRoleSubscriptionBenefit() {
String uniqueId = this.emoji.getUniqueId();
m.checkNotNullExpressionValue(uniqueId, "emoji.uniqueId");
return new GuildRoleSubscriptionBenefit(uniqueId, this.channelName, GuildRoleSubscriptionBenefitType.CHANNEL, this.description, Long.valueOf(this.channelId));
Emoji emoji = this.emoji;
String str = null;
if (!(emoji instanceof ModelEmojiCustom)) {
emoji = null;
}
ModelEmojiCustom modelEmojiCustom = (ModelEmojiCustom) emoji;
Long valueOf = modelEmojiCustom != null ? Long.valueOf(modelEmojiCustom.getId()) : null;
Emoji emoji2 = this.emoji;
if (!(emoji2 instanceof ModelEmojiUnicode)) {
emoji2 = null;
}
ModelEmojiUnicode modelEmojiUnicode = (ModelEmojiUnicode) emoji2;
if (modelEmojiUnicode != null) {
str = modelEmojiUnicode.getSurrogates();
}
return new GuildRoleSubscriptionBenefit(valueOf, str, this.channelName, GuildRoleSubscriptionBenefitType.CHANNEL, this.description, Long.valueOf(this.channelId));
}
@Override // java.lang.Object
@ -302,9 +317,22 @@ public abstract class Benefit implements Parcelable {
@Override // com.discord.widgets.guild_role_subscriptions.tier.model.Benefit
public GuildRoleSubscriptionBenefit toGuildRoleSubscriptionBenefit() {
String uniqueId = this.emoji.getUniqueId();
m.checkNotNullExpressionValue(uniqueId, "emoji.uniqueId");
return new GuildRoleSubscriptionBenefit(uniqueId, this.name, GuildRoleSubscriptionBenefitType.INTANGIBLE, this.description, null);
Emoji emoji = this.emoji;
String str = null;
if (!(emoji instanceof ModelEmojiCustom)) {
emoji = null;
}
ModelEmojiCustom modelEmojiCustom = (ModelEmojiCustom) emoji;
Long valueOf = modelEmojiCustom != null ? Long.valueOf(modelEmojiCustom.getId()) : null;
Emoji emoji2 = this.emoji;
if (!(emoji2 instanceof ModelEmojiUnicode)) {
emoji2 = null;
}
ModelEmojiUnicode modelEmojiUnicode = (ModelEmojiUnicode) emoji2;
if (modelEmojiUnicode != null) {
str = modelEmojiUnicode.getSurrogates();
}
return new GuildRoleSubscriptionBenefit(valueOf, str, this.name, GuildRoleSubscriptionBenefitType.INTANGIBLE, this.description, null);
}
@Override // java.lang.Object

View File

@ -1,6 +1,5 @@
package com.discord.widgets.guild_role_subscriptions.tier.model;
import androidx.media.AudioAttributesCompat;
import c.d.b.a.a;
import com.discord.widgets.guild_role_subscriptions.tier.model.Benefit;
import d0.t.n;
@ -9,6 +8,7 @@ import java.util.List;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: GuildRoleSubscriptionTier.kt */
public final class GuildRoleSubscriptionTier {
private final Long applicationId;
private final List<Benefit.ChannelBenefit> channelBenefits;
private final String description;
private final String image;
@ -21,18 +21,19 @@ public final class GuildRoleSubscriptionTier {
private final Integer priceTier;
public GuildRoleSubscriptionTier() {
this(null, null, null, null, null, null, null, null, null, null, AudioAttributesCompat.FLAG_ALL, null);
this(null, null, null, null, null, null, null, null, null, null, null, 2047, null);
}
public GuildRoleSubscriptionTier(String str, Integer num, Integer num2, String str2, String str3, Long l, String str4, Boolean bool, List<Benefit.ChannelBenefit> list, List<Benefit.IntangibleBenefit> list2) {
public GuildRoleSubscriptionTier(String str, Long l, Integer num, Integer num2, String str2, String str3, Long l2, String str4, Boolean bool, List<Benefit.ChannelBenefit> list, List<Benefit.IntangibleBenefit> list2) {
m.checkNotNullParameter(list, "channelBenefits");
m.checkNotNullParameter(list2, "intangibleBenefits");
this.name = str;
this.applicationId = l;
this.priceTier = num;
this.memberColor = num2;
this.memberBadge = str2;
this.image = str3;
this.imageAssetId = l;
this.imageAssetId = l2;
this.description = str4;
this.isPublished = bool;
this.channelBenefits = list;
@ -40,58 +41,62 @@ public final class GuildRoleSubscriptionTier {
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ GuildRoleSubscriptionTier(String str, Integer num, Integer num2, String str2, String str3, Long l, String str4, Boolean bool, List list, List list2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : str, (i & 2) != 0 ? null : num, (i & 4) != 0 ? null : num2, (i & 8) != 0 ? null : str2, (i & 16) != 0 ? null : str3, (i & 32) != 0 ? null : l, (i & 64) != 0 ? null : str4, (i & 128) == 0 ? bool : null, (i & 256) != 0 ? n.emptyList() : list, (i & 512) != 0 ? n.emptyList() : list2);
public /* synthetic */ GuildRoleSubscriptionTier(String str, Long l, Integer num, Integer num2, String str2, String str3, Long l2, String str4, Boolean bool, List list, List list2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : str, (i & 2) != 0 ? null : l, (i & 4) != 0 ? null : num, (i & 8) != 0 ? null : num2, (i & 16) != 0 ? null : str2, (i & 32) != 0 ? null : str3, (i & 64) != 0 ? null : l2, (i & 128) != 0 ? null : str4, (i & 256) == 0 ? bool : null, (i & 512) != 0 ? n.emptyList() : list, (i & 1024) != 0 ? n.emptyList() : list2);
}
public static /* synthetic */ GuildRoleSubscriptionTier copy$default(GuildRoleSubscriptionTier guildRoleSubscriptionTier, String str, Integer num, Integer num2, String str2, String str3, Long l, String str4, Boolean bool, List list, List list2, int i, Object obj) {
return guildRoleSubscriptionTier.copy((i & 1) != 0 ? guildRoleSubscriptionTier.name : str, (i & 2) != 0 ? guildRoleSubscriptionTier.priceTier : num, (i & 4) != 0 ? guildRoleSubscriptionTier.memberColor : num2, (i & 8) != 0 ? guildRoleSubscriptionTier.memberBadge : str2, (i & 16) != 0 ? guildRoleSubscriptionTier.image : str3, (i & 32) != 0 ? guildRoleSubscriptionTier.imageAssetId : l, (i & 64) != 0 ? guildRoleSubscriptionTier.description : str4, (i & 128) != 0 ? guildRoleSubscriptionTier.isPublished : bool, (i & 256) != 0 ? guildRoleSubscriptionTier.channelBenefits : list, (i & 512) != 0 ? guildRoleSubscriptionTier.intangibleBenefits : list2);
public static /* synthetic */ GuildRoleSubscriptionTier copy$default(GuildRoleSubscriptionTier guildRoleSubscriptionTier, String str, Long l, Integer num, Integer num2, String str2, String str3, Long l2, String str4, Boolean bool, List list, List list2, int i, Object obj) {
return guildRoleSubscriptionTier.copy((i & 1) != 0 ? guildRoleSubscriptionTier.name : str, (i & 2) != 0 ? guildRoleSubscriptionTier.applicationId : l, (i & 4) != 0 ? guildRoleSubscriptionTier.priceTier : num, (i & 8) != 0 ? guildRoleSubscriptionTier.memberColor : num2, (i & 16) != 0 ? guildRoleSubscriptionTier.memberBadge : str2, (i & 32) != 0 ? guildRoleSubscriptionTier.image : str3, (i & 64) != 0 ? guildRoleSubscriptionTier.imageAssetId : l2, (i & 128) != 0 ? guildRoleSubscriptionTier.description : str4, (i & 256) != 0 ? guildRoleSubscriptionTier.isPublished : bool, (i & 512) != 0 ? guildRoleSubscriptionTier.channelBenefits : list, (i & 1024) != 0 ? guildRoleSubscriptionTier.intangibleBenefits : list2);
}
public final String component1() {
return this.name;
}
public final List<Benefit.IntangibleBenefit> component10() {
return this.intangibleBenefits;
}
public final Integer component2() {
return this.priceTier;
}
public final Integer component3() {
return this.memberColor;
}
public final String component4() {
return this.memberBadge;
}
public final String component5() {
return this.image;
}
public final Long component6() {
return this.imageAssetId;
}
public final String component7() {
return this.description;
}
public final Boolean component8() {
return this.isPublished;
}
public final List<Benefit.ChannelBenefit> component9() {
public final List<Benefit.ChannelBenefit> component10() {
return this.channelBenefits;
}
public final GuildRoleSubscriptionTier copy(String str, Integer num, Integer num2, String str2, String str3, Long l, String str4, Boolean bool, List<Benefit.ChannelBenefit> list, List<Benefit.IntangibleBenefit> list2) {
public final List<Benefit.IntangibleBenefit> component11() {
return this.intangibleBenefits;
}
public final Long component2() {
return this.applicationId;
}
public final Integer component3() {
return this.priceTier;
}
public final Integer component4() {
return this.memberColor;
}
public final String component5() {
return this.memberBadge;
}
public final String component6() {
return this.image;
}
public final Long component7() {
return this.imageAssetId;
}
public final String component8() {
return this.description;
}
public final Boolean component9() {
return this.isPublished;
}
public final GuildRoleSubscriptionTier copy(String str, Long l, Integer num, Integer num2, String str2, String str3, Long l2, String str4, Boolean bool, List<Benefit.ChannelBenefit> list, List<Benefit.IntangibleBenefit> list2) {
m.checkNotNullParameter(list, "channelBenefits");
m.checkNotNullParameter(list2, "intangibleBenefits");
return new GuildRoleSubscriptionTier(str, num, num2, str2, str3, l, str4, bool, list, list2);
return new GuildRoleSubscriptionTier(str, l, num, num2, str2, str3, l2, str4, bool, list, list2);
}
public boolean equals(Object obj) {
@ -102,7 +107,11 @@ public final class GuildRoleSubscriptionTier {
return false;
}
GuildRoleSubscriptionTier guildRoleSubscriptionTier = (GuildRoleSubscriptionTier) obj;
return m.areEqual(this.name, guildRoleSubscriptionTier.name) && m.areEqual(this.priceTier, guildRoleSubscriptionTier.priceTier) && m.areEqual(this.memberColor, guildRoleSubscriptionTier.memberColor) && m.areEqual(this.memberBadge, guildRoleSubscriptionTier.memberBadge) && m.areEqual(this.image, guildRoleSubscriptionTier.image) && m.areEqual(this.imageAssetId, guildRoleSubscriptionTier.imageAssetId) && m.areEqual(this.description, guildRoleSubscriptionTier.description) && m.areEqual(this.isPublished, guildRoleSubscriptionTier.isPublished) && m.areEqual(this.channelBenefits, guildRoleSubscriptionTier.channelBenefits) && m.areEqual(this.intangibleBenefits, guildRoleSubscriptionTier.intangibleBenefits);
return m.areEqual(this.name, guildRoleSubscriptionTier.name) && m.areEqual(this.applicationId, guildRoleSubscriptionTier.applicationId) && m.areEqual(this.priceTier, guildRoleSubscriptionTier.priceTier) && m.areEqual(this.memberColor, guildRoleSubscriptionTier.memberColor) && m.areEqual(this.memberBadge, guildRoleSubscriptionTier.memberBadge) && m.areEqual(this.image, guildRoleSubscriptionTier.image) && m.areEqual(this.imageAssetId, guildRoleSubscriptionTier.imageAssetId) && m.areEqual(this.description, guildRoleSubscriptionTier.description) && m.areEqual(this.isPublished, guildRoleSubscriptionTier.isPublished) && m.areEqual(this.channelBenefits, guildRoleSubscriptionTier.channelBenefits) && m.areEqual(this.intangibleBenefits, guildRoleSubscriptionTier.intangibleBenefits);
}
public final Long getApplicationId() {
return this.applicationId;
}
public final List<Benefit.ChannelBenefit> getChannelBenefits() {
@ -145,27 +154,29 @@ public final class GuildRoleSubscriptionTier {
String str = this.name;
int i = 0;
int hashCode = (str != null ? str.hashCode() : 0) * 31;
Long l = this.applicationId;
int hashCode2 = (hashCode + (l != null ? l.hashCode() : 0)) * 31;
Integer num = this.priceTier;
int hashCode2 = (hashCode + (num != null ? num.hashCode() : 0)) * 31;
int hashCode3 = (hashCode2 + (num != null ? num.hashCode() : 0)) * 31;
Integer num2 = this.memberColor;
int hashCode3 = (hashCode2 + (num2 != null ? num2.hashCode() : 0)) * 31;
int hashCode4 = (hashCode3 + (num2 != null ? num2.hashCode() : 0)) * 31;
String str2 = this.memberBadge;
int hashCode4 = (hashCode3 + (str2 != null ? str2.hashCode() : 0)) * 31;
int hashCode5 = (hashCode4 + (str2 != null ? str2.hashCode() : 0)) * 31;
String str3 = this.image;
int hashCode5 = (hashCode4 + (str3 != null ? str3.hashCode() : 0)) * 31;
Long l = this.imageAssetId;
int hashCode6 = (hashCode5 + (l != null ? l.hashCode() : 0)) * 31;
int hashCode6 = (hashCode5 + (str3 != null ? str3.hashCode() : 0)) * 31;
Long l2 = this.imageAssetId;
int hashCode7 = (hashCode6 + (l2 != null ? l2.hashCode() : 0)) * 31;
String str4 = this.description;
int hashCode7 = (hashCode6 + (str4 != null ? str4.hashCode() : 0)) * 31;
int hashCode8 = (hashCode7 + (str4 != null ? str4.hashCode() : 0)) * 31;
Boolean bool = this.isPublished;
int hashCode8 = (hashCode7 + (bool != null ? bool.hashCode() : 0)) * 31;
int hashCode9 = (hashCode8 + (bool != null ? bool.hashCode() : 0)) * 31;
List<Benefit.ChannelBenefit> list = this.channelBenefits;
int hashCode9 = (hashCode8 + (list != null ? list.hashCode() : 0)) * 31;
int hashCode10 = (hashCode9 + (list != null ? list.hashCode() : 0)) * 31;
List<Benefit.IntangibleBenefit> list2 = this.intangibleBenefits;
if (list2 != null) {
i = list2.hashCode();
}
return hashCode9 + i;
return hashCode10 + i;
}
public final Boolean isPublished() {
@ -175,6 +186,8 @@ public final class GuildRoleSubscriptionTier {
public String toString() {
StringBuilder P = a.P("GuildRoleSubscriptionTier(name=");
P.append(this.name);
P.append(", applicationId=");
P.append(this.applicationId);
P.append(", priceTier=");
P.append(this.priceTier);
P.append(", memberColor=");

View File

@ -0,0 +1,18 @@
package com.discord.widgets.guildscheduledevent;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: GuildScheduledEventBottomButtonView.kt */
public final class GuildScheduledEventBottomButtonView$configure$5 extends o implements Function0<Unit> {
public static final GuildScheduledEventBottomButtonView$configure$5 INSTANCE = new GuildScheduledEventBottomButtonView$configure$5();
public GuildScheduledEventBottomButtonView$configure$5() {
super(0);
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
}
}

View File

@ -6,20 +6,24 @@ import kotlin.jvm.functions.Function0;
/* compiled from: GuildScheduledEventBottomButtonView.kt */
public final class GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1 implements View.OnClickListener {
public final /* synthetic */ boolean $isRsvped$inlined;
public final /* synthetic */ Function0 $onEndEventButtonClicked$inlined;
public final /* synthetic */ Function0 $onJoinButtonClicked$inlined;
public final /* synthetic */ Function0 $onRsvpButtonClicked$inlined;
public final /* synthetic */ GuildScheduledEventBottomButtonView.VisibilityInfo $visibilityInfo$inlined;
public GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1(GuildScheduledEventBottomButtonView.VisibilityInfo visibilityInfo, boolean z2, Function0 function0, Function0 function02) {
public GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1(GuildScheduledEventBottomButtonView.VisibilityInfo visibilityInfo, boolean z2, Function0 function0, Function0 function02, Function0 function03) {
this.$visibilityInfo$inlined = visibilityInfo;
this.$isRsvped$inlined = z2;
this.$onJoinButtonClicked$inlined = function0;
this.$onRsvpButtonClicked$inlined = function02;
this.$onEndEventButtonClicked$inlined = function0;
this.$onJoinButtonClicked$inlined = function02;
this.$onRsvpButtonClicked$inlined = function03;
}
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (this.$visibilityInfo$inlined.isEventActive()) {
if (this.$visibilityInfo$inlined.isEndEventVisible()) {
this.$onEndEventButtonClicked$inlined.mo1invoke();
} else if (this.$visibilityInfo$inlined.isEventActive()) {
this.$onJoinButtonClicked$inlined.mo1invoke();
} else {
this.$onRsvpButtonClicked$inlined.mo1invoke();

View File

@ -20,6 +20,7 @@ import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilitiesKt;
import d0.z.d.m;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: GuildScheduledEventBottomButtonView.kt */
public final class GuildScheduledEventBottomButtonView extends ConstraintLayout {
private final GuildScheduledEventBottomButtonViewBinding binding;
@ -32,6 +33,8 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
private final GuildScheduledEvent guildScheduledEvent;
private final boolean isAnyButtonVisible;
private final boolean isConnected;
private final boolean isDetailView;
private final boolean isEndEventVisible;
private final boolean isEventActive;
private final boolean isEventComplete;
private final boolean isShareVisible;
@ -40,33 +43,41 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
private final boolean primaryInteractionButtonVisible;
private final GuildScheduledEventTiming timing;
public VisibilityInfo(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5) {
public VisibilityInfo(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6) {
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
this.guildScheduledEvent = guildScheduledEvent;
this.canRsvp = z2;
this.canShare = z3;
this.canStartEvent = z4;
this.isConnected = z5;
this.isDetailView = z6;
GuildScheduledEventTiming eventTiming = GuildScheduledEventUtilitiesKt.getEventTiming(guildScheduledEvent);
this.timing = eventTiming;
boolean z6 = true;
boolean z7 = guildScheduledEvent.k() == GuildScheduledEventStatus.COMPLETED;
this.isEventComplete = z7;
boolean z8 = eventTiming == GuildScheduledEventTiming.LIVE;
this.isEventActive = z8;
boolean z7 = true;
boolean z8 = guildScheduledEvent.k() == GuildScheduledEventStatus.COMPLETED;
this.isEventComplete = z8;
boolean z9 = eventTiming == GuildScheduledEventTiming.LIVE;
this.isEventActive = z9;
this.primaryInteractionButtonVisible = z2;
this.primaryInteractionButtonEnabled = !z7 && (!z8 || guildScheduledEvent.e() != GuildScheduledEventEntityType.EXTERNAL);
boolean isStartable = (!z4 || z7) ? false : eventTiming.isStartable();
this.primaryInteractionButtonEnabled = !z8 && (!z9 || guildScheduledEvent.e() != GuildScheduledEventEntityType.EXTERNAL);
boolean isStartable = (!z4 || z8) ? false : eventTiming.isStartable();
this.isStartEventVisible = isStartable;
boolean z9 = z3 && !z7;
this.isShareVisible = z9;
if (!z2 && !isStartable && !z9) {
z6 = false;
boolean z10 = z6 && z9 && z5 && z4;
this.isEndEventVisible = z10;
boolean z11 = z3 && !z8;
this.isShareVisible = z11;
if (!z2 && !isStartable && !z10 && !z11) {
z7 = false;
}
this.isAnyButtonVisible = z6;
this.isAnyButtonVisible = z7;
}
public static /* synthetic */ VisibilityInfo copy$default(VisibilityInfo visibilityInfo, GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, int i, Object obj) {
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ VisibilityInfo(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(guildScheduledEvent, z2, z3, z4, z5, (i & 32) != 0 ? false : z6);
}
public static /* synthetic */ VisibilityInfo copy$default(VisibilityInfo visibilityInfo, GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, int i, Object obj) {
if ((i & 1) != 0) {
guildScheduledEvent = visibilityInfo.guildScheduledEvent;
}
@ -82,7 +93,10 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
if ((i & 16) != 0) {
z5 = visibilityInfo.isConnected;
}
return visibilityInfo.copy(guildScheduledEvent, z2, z3, z4, z5);
if ((i & 32) != 0) {
z6 = visibilityInfo.isDetailView;
}
return visibilityInfo.copy(guildScheduledEvent, z2, z3, z4, z5, z6);
}
public final GuildScheduledEvent component1() {
@ -105,9 +119,13 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
return this.isConnected;
}
public final VisibilityInfo copy(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5) {
public final boolean component6() {
return this.isDetailView;
}
public final VisibilityInfo copy(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6) {
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
return new VisibilityInfo(guildScheduledEvent, z2, z3, z4, z5);
return new VisibilityInfo(guildScheduledEvent, z2, z3, z4, z5, z6);
}
public boolean equals(Object obj) {
@ -118,7 +136,7 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
return false;
}
VisibilityInfo visibilityInfo = (VisibilityInfo) obj;
return m.areEqual(this.guildScheduledEvent, visibilityInfo.guildScheduledEvent) && this.canRsvp == visibilityInfo.canRsvp && this.canShare == visibilityInfo.canShare && this.canStartEvent == visibilityInfo.canStartEvent && this.isConnected == visibilityInfo.isConnected;
return m.areEqual(this.guildScheduledEvent, visibilityInfo.guildScheduledEvent) && this.canRsvp == visibilityInfo.canRsvp && this.canShare == visibilityInfo.canShare && this.canStartEvent == visibilityInfo.canStartEvent && this.isConnected == visibilityInfo.isConnected && this.isDetailView == visibilityInfo.isDetailView;
}
public final boolean getCanRsvp() {
@ -178,10 +196,18 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
int i12 = z4 ? 1 : 0;
int i13 = (i9 + i10) * 31;
boolean z5 = this.isConnected;
if (!z5) {
i = z5 ? 1 : 0;
if (z5) {
z5 = true;
}
return i13 + i;
int i14 = z5 ? 1 : 0;
int i15 = z5 ? 1 : 0;
int i16 = z5 ? 1 : 0;
int i17 = (i13 + i14) * 31;
boolean z6 = this.isDetailView;
if (!z6) {
i = z6 ? 1 : 0;
}
return i17 + i;
}
public final boolean isAnyButtonVisible() {
@ -192,6 +218,14 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
return this.isConnected;
}
public final boolean isDetailView() {
return this.isDetailView;
}
public final boolean isEndEventVisible() {
return this.isEndEventVisible;
}
public final boolean isEventActive() {
return this.isEventActive;
}
@ -218,7 +252,9 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
P.append(", canStartEvent=");
P.append(this.canStartEvent);
P.append(", isConnected=");
return a.L(P, this.isConnected, ")");
P.append(this.isConnected);
P.append(", isDetailView=");
return a.L(P, this.isDetailView, ")");
}
}
@ -251,7 +287,7 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
this.binding = a;
}
public static /* synthetic */ void configure$default(GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView, GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, Function0 function0, Function0 function02, Function0 function03, Function0 function04, int i, Object obj) {
public static /* synthetic */ void configure$default(GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView, GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, Function0 function0, Function0 function02, Function0 function03, Function0 function04, Function0 function05, int i, Object obj) {
boolean z7 = false;
boolean z8 = (i & 2) != 0 ? false : z2;
boolean z9 = (i & 4) != 0 ? false : z3;
@ -260,15 +296,26 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
if ((i & 32) == 0) {
z7 = z6;
}
guildScheduledEventBottomButtonView.configure(guildScheduledEvent, z8, z9, z10, z11, z7, (i & 64) != 0 ? GuildScheduledEventBottomButtonView$configure$1.INSTANCE : function0, (i & 128) != 0 ? GuildScheduledEventBottomButtonView$configure$2.INSTANCE : function02, (i & 256) != 0 ? GuildScheduledEventBottomButtonView$configure$3.INSTANCE : function03, (i & 512) != 0 ? GuildScheduledEventBottomButtonView$configure$4.INSTANCE : function04);
guildScheduledEventBottomButtonView.configure(guildScheduledEvent, z8, z9, z10, z11, z7, (i & 64) != 0 ? GuildScheduledEventBottomButtonView$configure$1.INSTANCE : function0, (i & 128) != 0 ? GuildScheduledEventBottomButtonView$configure$2.INSTANCE : function02, (i & 256) != 0 ? GuildScheduledEventBottomButtonView$configure$3.INSTANCE : function03, (i & 512) != 0 ? GuildScheduledEventBottomButtonView$configure$4.INSTANCE : function04, (i & 1024) != 0 ? GuildScheduledEventBottomButtonView$configure$5.INSTANCE : function05);
}
private final void configureInterestedButton(VisibilityInfo visibilityInfo, boolean z2, Function0<Unit> function0, Function0<Unit> function02) {
private final void configureInterestedButton(VisibilityInfo visibilityInfo, boolean z2, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03) {
ImageView imageView = this.binding.f1633c;
int i = 8;
imageView.setVisibility(visibilityInfo.getPrimaryInteractionButtonVisible() ? 0 : 8);
imageView.setImageResource(!visibilityInfo.getPrimaryInteractionButtonEnabled() ? R.drawable.bg_guild_scheduled_event_list_item_interested_button_disabled : visibilityInfo.isEventActive() ? R.drawable.bg_guild_scheduled_event_list_item_interested_button_active : z2 ? R.drawable.bg_guild_scheduled_event_list_item_interested_button_interested : R.drawable.bg_guild_scheduled_event_list_item_interested_button_default);
imageView.setOnClickListener(new GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1(visibilityInfo, z2, function02, function0));
boolean primaryInteractionButtonEnabled = visibilityInfo.getPrimaryInteractionButtonEnabled();
int i2 = R.drawable.bg_guild_scheduled_event_list_item_interested_button_default;
if (!primaryInteractionButtonEnabled) {
i2 = R.drawable.bg_guild_scheduled_event_list_item_interested_button_disabled;
} else if (!visibilityInfo.isEndEventVisible()) {
if (visibilityInfo.isEventActive()) {
i2 = R.drawable.bg_guild_scheduled_event_list_item_interested_button_active;
} else if (z2) {
i2 = R.drawable.bg_guild_scheduled_event_list_item_interested_button_interested;
}
}
imageView.setImageResource(i2);
imageView.setOnClickListener(new GuildScheduledEventBottomButtonView$configureInterestedButton$$inlined$apply$lambda$1(visibilityInfo, z2, function03, function02, function0));
imageView.setEnabled(visibilityInfo.getPrimaryInteractionButtonEnabled());
TextView textView = this.binding.d;
if (visibilityInfo.getPrimaryInteractionButtonVisible()) {
@ -276,13 +323,13 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
}
textView.setVisibility(i);
int color = !visibilityInfo.getPrimaryInteractionButtonEnabled() ? ColorCompat.getColor(textView.getContext(), (int) R.color.white_alpha_40) : (!z2 || visibilityInfo.isEventActive() || visibilityInfo.isEventComplete()) ? ColorCompat.getColor(textView.getContext(), (int) R.color.white) : ColorCompat.getThemedColor(textView.getContext(), (int) R.attr.colorInteractiveActive);
int i2 = (visibilityInfo.isEventActive() || !visibilityInfo.getPrimaryInteractionButtonEnabled()) ? 0 : z2 ? R.drawable.ic_check_active_16dp : R.drawable.ic_bell_16dp;
int i3 = (!visibilityInfo.isEventActive() || visibilityInfo.getGuildScheduledEvent().e() != GuildScheduledEventEntityType.EXTERNAL) ? (!visibilityInfo.isEventActive() || !visibilityInfo.isConnected()) ? (!visibilityInfo.isEventActive() || visibilityInfo.getGuildScheduledEvent().e() != GuildScheduledEventEntityType.VOICE) ? visibilityInfo.isEventActive() ? R.string.stage_channel_join_button : visibilityInfo.isEventComplete() ? R.string.guild_event_invite_completed : R.string.stage_instance_interested_label : R.string.guild_event_join : R.string.go_to_channel : R.string.guild_event_started;
DrawableCompat.setCompoundDrawablesCompat$default(textView, i2, 0, 0, 0, 14, (Object) null);
int i3 = (visibilityInfo.isEventActive() || !visibilityInfo.getPrimaryInteractionButtonEnabled()) ? 0 : z2 ? R.drawable.ic_check_active_16dp : R.drawable.ic_bell_16dp;
int i4 = (!visibilityInfo.isEventActive() || visibilityInfo.getGuildScheduledEvent().e() != GuildScheduledEventEntityType.EXTERNAL) ? visibilityInfo.isEndEventVisible() ? R.string.end_event : (!visibilityInfo.isEventActive() || !visibilityInfo.isConnected()) ? (!visibilityInfo.isEventActive() || visibilityInfo.getGuildScheduledEvent().e() != GuildScheduledEventEntityType.VOICE) ? visibilityInfo.isEventActive() ? R.string.stage_channel_join_button : visibilityInfo.isEventComplete() ? R.string.guild_event_invite_completed : R.string.stage_instance_interested_label : R.string.guild_event_join : R.string.go_to_channel : R.string.guild_event_started;
DrawableCompat.setCompoundDrawablesCompat$default(textView, i3, 0, 0, 0, 14, (Object) null);
textView.setTextColor(color);
Context context = textView.getContext();
m.checkNotNullExpressionValue(context, "context");
textView.setText(b.h(context, i3, new Object[0], null, 4));
textView.setText(b.h(context, i4, new Object[0], null, 4));
}
private final void configureShareButton(VisibilityInfo visibilityInfo, Function0<Unit> function0) {
@ -305,45 +352,56 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout
imageView.setOnClickListener(new GuildScheduledEventBottomButtonView$configureStartEventButton$$inlined$apply$lambda$1(visibilityInfo, function0));
}
public final void configure(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04) {
public final void configure(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05) {
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
m.checkNotNullParameter(function0, "onRsvpButtonClicked");
m.checkNotNullParameter(function02, "onStartEventButtonClicked");
m.checkNotNullParameter(function03, "onShareButtonClicked");
m.checkNotNullParameter(function04, "onJoinButtonClicked");
VisibilityInfo visibilityInfo = new VisibilityInfo(guildScheduledEvent, z3, z4, z5, z6);
m.checkNotNullParameter(function05, "onEndEventButtonClicked");
VisibilityInfo visibilityInfo = new VisibilityInfo(guildScheduledEvent, z3, z4, z5, z6, false, 32, null);
configureStartEventButton(visibilityInfo, function02);
configureInterestedButton(visibilityInfo, z2, function0, function04);
configureInterestedButton(visibilityInfo, z2, function0, function04, function05);
configureShareButton(visibilityInfo, function03);
}
public final void configureForDetails(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05) {
public final void configureForDetails(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05, Function0<Unit> function06) {
Function0<Unit> function07;
Function0<Unit> function08;
VisibilityInfo visibilityInfo;
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
m.checkNotNullParameter(function0, "onStartEventButtonClicked");
m.checkNotNullParameter(function02, "onRsvpButtonClicked");
m.checkNotNullParameter(function03, "onShareButtonClicked");
m.checkNotNullParameter(function05, "onJoinButtonClicked");
VisibilityInfo visibilityInfo = new VisibilityInfo(guildScheduledEvent, true, z3, z4, false);
configureStartEventButton(visibilityInfo, function0);
m.checkNotNullParameter(function06, "onEndEventButtonClicked");
VisibilityInfo visibilityInfo2 = new VisibilityInfo(guildScheduledEvent, true, z4, z5, z3, true);
configureStartEventButton(visibilityInfo2, function0);
int i = 8;
if (visibilityInfo.isStartEventVisible()) {
if (visibilityInfo2.isStartEventVisible()) {
ImageView imageView = this.binding.f1633c;
m.checkNotNullExpressionValue(imageView, "binding.interestedButton");
imageView.setVisibility(8);
TextView textView = this.binding.d;
m.checkNotNullExpressionValue(textView, "binding.interestedButtonText");
textView.setVisibility(8);
visibilityInfo = visibilityInfo2;
function08 = function04;
function07 = function03;
} else {
configureInterestedButton(visibilityInfo, z2, function02, function05);
visibilityInfo = visibilityInfo2;
function08 = function04;
function07 = function03;
configureInterestedButton(visibilityInfo2, z2, function02, function05, function06);
}
configureShareButton(visibilityInfo, function03);
configureShareButton(visibilityInfo, function07);
ImageView imageView2 = this.binding.b;
if (function04 != null && (z4 || z5)) {
if (function08 != null && (z5 || z6)) {
i = 0;
}
imageView2.setVisibility(i);
if (function04 != null) {
imageView2.setOnClickListener(new GuildScheduledEventBottomButtonView$configureForDetails$$inlined$apply$lambda$1(function04, z4, z5));
if (function08 != null) {
imageView2.setOnClickListener(new GuildScheduledEventBottomButtonView$configureForDetails$$inlined$apply$lambda$1(function08, z5, z6));
}
}

View File

@ -8,6 +8,7 @@ import com.discord.stores.StoreGuildScheduledEvents;
import com.discord.stores.StoreGuilds;
import com.discord.stores.StorePermissions;
import com.discord.stores.StoreUserSettings;
import com.discord.stores.StoreVoiceChannelSelected;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilities;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventDetailsViewModel;
import d0.z.d.o;
@ -19,15 +20,17 @@ public final class GuildScheduledEventDetailsViewModel$Companion$observeStores$1
public final /* synthetic */ StoreGuildScheduledEvents $guildScheduledEventsStore;
public final /* synthetic */ StoreGuilds $guildsStore;
public final /* synthetic */ StorePermissions $permissionsStore;
public final /* synthetic */ StoreVoiceChannelSelected $selectedVoiceChannelStore;
public final /* synthetic */ StoreUserSettings $userSettingsStore;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public GuildScheduledEventDetailsViewModel$Companion$observeStores$1(StoreGuildScheduledEvents storeGuildScheduledEvents, long j, StoreChannels storeChannels, StoreGuilds storeGuilds, StorePermissions storePermissions, StoreUserSettings storeUserSettings) {
public GuildScheduledEventDetailsViewModel$Companion$observeStores$1(StoreGuildScheduledEvents storeGuildScheduledEvents, long j, StoreChannels storeChannels, StoreGuilds storeGuilds, StoreVoiceChannelSelected storeVoiceChannelSelected, StorePermissions storePermissions, StoreUserSettings storeUserSettings) {
super(0);
this.$guildScheduledEventsStore = storeGuildScheduledEvents;
this.$guildScheduledEventId = j;
this.$channelsStore = storeChannels;
this.$guildsStore = storeGuilds;
this.$selectedVoiceChannelStore = storeVoiceChannelSelected;
this.$permissionsStore = storePermissions;
this.$userSettingsStore = storeUserSettings;
}
@ -38,7 +41,7 @@ public final class GuildScheduledEventDetailsViewModel$Companion$observeStores$1
Channel channel;
GuildScheduledEvent findEventFromStore$default = StoreGuildScheduledEvents.findEventFromStore$default(this.$guildScheduledEventsStore, this.$guildScheduledEventId, null, 2, null);
if (findEventFromStore$default == null) {
return new GuildScheduledEventDetailsViewModel.StoreState(null, null, null, false, false, false, false, 127, null);
return new GuildScheduledEventDetailsViewModel.StoreState(null, null, null, false, false, false, false, null, 255, null);
}
Long b = findEventFromStore$default.b();
if (b != null) {
@ -47,8 +50,9 @@ public final class GuildScheduledEventDetailsViewModel$Companion$observeStores$1
channel = null;
}
Guild guild = this.$guildsStore.getGuild(findEventFromStore$default.f());
Long valueOf = Long.valueOf(this.$selectedVoiceChannelStore.getSelectedVoiceChannelId());
boolean isRsvpedToEvent = this.$guildScheduledEventsStore.isRsvpedToEvent(this.$guildScheduledEventId);
GuildScheduledEventUtilities.Companion companion = GuildScheduledEventUtilities.Companion;
return new GuildScheduledEventDetailsViewModel.StoreState(findEventFromStore$default, channel, guild, isRsvpedToEvent, GuildScheduledEventUtilities.Companion.canShareEvent$default(companion, findEventFromStore$default.b(), this.$channelsStore, this.$guildsStore, null, 8, null), companion.canStartEvent(findEventFromStore$default.f(), findEventFromStore$default.b(), this.$channelsStore, this.$permissionsStore), this.$userSettingsStore.getIsDeveloperMode());
return new GuildScheduledEventDetailsViewModel.StoreState(findEventFromStore$default, channel, guild, isRsvpedToEvent, GuildScheduledEventUtilities.Companion.canShareEvent$default(companion, findEventFromStore$default.b(), this.$channelsStore, this.$guildsStore, null, 8, null), companion.canStartEvent(findEventFromStore$default.f(), findEventFromStore$default.b(), this.$channelsStore, this.$permissionsStore), this.$userSettingsStore.getIsDeveloperMode(), valueOf);
}
}

View File

@ -12,6 +12,7 @@ import com.discord.stores.StoreGuilds;
import com.discord.stores.StorePermissions;
import com.discord.stores.StoreStream;
import com.discord.stores.StoreUserSettings;
import com.discord.stores.StoreVoiceChannelSelected;
import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.utilities.rest.RestAPI;
@ -59,12 +60,12 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
this();
}
public static final /* synthetic */ Observable access$observeStores(Companion companion, long j, ObservationDeck observationDeck, StoreGuildScheduledEvents storeGuildScheduledEvents, StoreGuilds storeGuilds, StoreChannels storeChannels, StorePermissions storePermissions, StoreUserSettings storeUserSettings) {
return companion.observeStores(j, observationDeck, storeGuildScheduledEvents, storeGuilds, storeChannels, storePermissions, storeUserSettings);
public static final /* synthetic */ Observable access$observeStores(Companion companion, long j, ObservationDeck observationDeck, StoreGuildScheduledEvents storeGuildScheduledEvents, StoreGuilds storeGuilds, StoreChannels storeChannels, StorePermissions storePermissions, StoreUserSettings storeUserSettings, StoreVoiceChannelSelected storeVoiceChannelSelected) {
return companion.observeStores(j, observationDeck, storeGuildScheduledEvents, storeGuilds, storeChannels, storePermissions, storeUserSettings, storeVoiceChannelSelected);
}
private final Observable<StoreState> observeStores(long j, ObservationDeck observationDeck, StoreGuildScheduledEvents storeGuildScheduledEvents, StoreGuilds storeGuilds, StoreChannels storeChannels, StorePermissions storePermissions, StoreUserSettings storeUserSettings) {
return ObservationDeck.connectRx$default(observationDeck, new ObservationDeck.UpdateSource[]{storeGuildScheduledEvents, storeGuilds, storeChannels, storePermissions}, false, null, null, new GuildScheduledEventDetailsViewModel$Companion$observeStores$1(storeGuildScheduledEvents, j, storeChannels, storeGuilds, storePermissions, storeUserSettings), 14, null);
private final Observable<StoreState> observeStores(long j, ObservationDeck observationDeck, StoreGuildScheduledEvents storeGuildScheduledEvents, StoreGuilds storeGuilds, StoreChannels storeChannels, StorePermissions storePermissions, StoreUserSettings storeUserSettings, StoreVoiceChannelSelected storeVoiceChannelSelected) {
return ObservationDeck.connectRx$default(observationDeck, new ObservationDeck.UpdateSource[]{storeGuildScheduledEvents, storeGuilds, storeChannels, storePermissions, storeVoiceChannelSelected}, false, null, null, new GuildScheduledEventDetailsViewModel$Companion$observeStores$1(storeGuildScheduledEvents, j, storeChannels, storeGuilds, storeVoiceChannelSelected, storePermissions, storeUserSettings), 14, null);
}
}
@ -77,12 +78,13 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
private final GuildScheduledEvent guildScheduledEvent;
private final boolean isDeveloperMode;
private final boolean isRsvped;
private final Long selectedVoiceChannelId;
public StoreState() {
this(null, null, null, false, false, false, false, 127, null);
this(null, null, null, false, false, false, false, null, 255, null);
}
public StoreState(GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5) {
public StoreState(GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, Long l) {
this.guildScheduledEvent = guildScheduledEvent;
this.channel = channel;
this.guild = guild;
@ -90,36 +92,16 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
this.canShare = z3;
this.canStartEvent = z4;
this.isDeveloperMode = z5;
this.selectedVoiceChannelId = l;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ StoreState(GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : guildScheduledEvent, (i & 2) != 0 ? null : channel, (i & 4) == 0 ? guild : null, (i & 8) != 0 ? false : z2, (i & 16) != 0 ? false : z3, (i & 32) != 0 ? false : z4, (i & 64) != 0 ? false : z5);
public /* synthetic */ StoreState(GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, Long l, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : guildScheduledEvent, (i & 2) != 0 ? null : channel, (i & 4) != 0 ? null : guild, (i & 8) != 0 ? false : z2, (i & 16) != 0 ? false : z3, (i & 32) != 0 ? false : z4, (i & 64) == 0 ? z5 : false, (i & 128) == 0 ? l : null);
}
public static /* synthetic */ StoreState copy$default(StoreState storeState, GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, int i, Object obj) {
if ((i & 1) != 0) {
guildScheduledEvent = storeState.guildScheduledEvent;
}
if ((i & 2) != 0) {
channel = storeState.channel;
}
if ((i & 4) != 0) {
guild = storeState.guild;
}
if ((i & 8) != 0) {
z2 = storeState.isRsvped;
}
if ((i & 16) != 0) {
z3 = storeState.canShare;
}
if ((i & 32) != 0) {
z4 = storeState.canStartEvent;
}
if ((i & 64) != 0) {
z5 = storeState.isDeveloperMode;
}
return storeState.copy(guildScheduledEvent, channel, guild, z2, z3, z4, z5);
public static /* synthetic */ StoreState copy$default(StoreState storeState, GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, Long l, int i, Object obj) {
return storeState.copy((i & 1) != 0 ? storeState.guildScheduledEvent : guildScheduledEvent, (i & 2) != 0 ? storeState.channel : channel, (i & 4) != 0 ? storeState.guild : guild, (i & 8) != 0 ? storeState.isRsvped : z2, (i & 16) != 0 ? storeState.canShare : z3, (i & 32) != 0 ? storeState.canStartEvent : z4, (i & 64) != 0 ? storeState.isDeveloperMode : z5, (i & 128) != 0 ? storeState.selectedVoiceChannelId : l);
}
public final GuildScheduledEvent component1() {
@ -150,8 +132,12 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
return this.isDeveloperMode;
}
public final StoreState copy(GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5) {
return new StoreState(guildScheduledEvent, channel, guild, z2, z3, z4, z5);
public final Long component8() {
return this.selectedVoiceChannelId;
}
public final StoreState copy(GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, Long l) {
return new StoreState(guildScheduledEvent, channel, guild, z2, z3, z4, z5, l);
}
public boolean equals(Object obj) {
@ -162,7 +148,7 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
return false;
}
StoreState storeState = (StoreState) obj;
return m.areEqual(this.guildScheduledEvent, storeState.guildScheduledEvent) && m.areEqual(this.channel, storeState.channel) && m.areEqual(this.guild, storeState.guild) && this.isRsvped == storeState.isRsvped && this.canShare == storeState.canShare && this.canStartEvent == storeState.canStartEvent && this.isDeveloperMode == storeState.isDeveloperMode;
return m.areEqual(this.guildScheduledEvent, storeState.guildScheduledEvent) && m.areEqual(this.channel, storeState.channel) && m.areEqual(this.guild, storeState.guild) && this.isRsvped == storeState.isRsvped && this.canShare == storeState.canShare && this.canStartEvent == storeState.canStartEvent && this.isDeveloperMode == storeState.isDeveloperMode && m.areEqual(this.selectedVoiceChannelId, storeState.selectedVoiceChannelId);
}
public final boolean getCanShare() {
@ -185,6 +171,10 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
return this.guildScheduledEvent;
}
public final Long getSelectedVoiceChannelId() {
return this.selectedVoiceChannelId;
}
public int hashCode() {
GuildScheduledEvent guildScheduledEvent = this.guildScheduledEvent;
int i = 0;
@ -192,40 +182,42 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
Channel channel = this.channel;
int hashCode2 = (hashCode + (channel != null ? channel.hashCode() : 0)) * 31;
Guild guild = this.guild;
if (guild != null) {
i = guild.hashCode();
}
int i2 = (hashCode2 + i) * 31;
int hashCode3 = (hashCode2 + (guild != null ? guild.hashCode() : 0)) * 31;
boolean z2 = this.isRsvped;
int i3 = 1;
int i2 = 1;
if (z2) {
z2 = true;
}
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = z2 ? 1 : 0;
int i6 = z2 ? 1 : 0;
int i7 = (i2 + i4) * 31;
int i6 = (hashCode3 + i3) * 31;
boolean z3 = this.canShare;
if (z3) {
z3 = true;
}
int i7 = z3 ? 1 : 0;
int i8 = z3 ? 1 : 0;
int i9 = z3 ? 1 : 0;
int i10 = z3 ? 1 : 0;
int i11 = (i7 + i8) * 31;
int i10 = (i6 + i7) * 31;
boolean z4 = this.canStartEvent;
if (z4) {
z4 = true;
}
int i11 = z4 ? 1 : 0;
int i12 = z4 ? 1 : 0;
int i13 = z4 ? 1 : 0;
int i14 = z4 ? 1 : 0;
int i15 = (i11 + i12) * 31;
int i14 = (i10 + i11) * 31;
boolean z5 = this.isDeveloperMode;
if (!z5) {
i3 = z5 ? 1 : 0;
i2 = z5 ? 1 : 0;
}
return i15 + i3;
int i15 = (i14 + i2) * 31;
Long l = this.selectedVoiceChannelId;
if (l != null) {
i = l.hashCode();
}
return i15 + i;
}
public final boolean isDeveloperMode() {
@ -250,7 +242,9 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
P.append(", canStartEvent=");
P.append(this.canStartEvent);
P.append(", isDeveloperMode=");
return a.L(P, this.isDeveloperMode, ")");
P.append(this.isDeveloperMode);
P.append(", selectedVoiceChannelId=");
return a.F(P, this.selectedVoiceChannelId, ")");
}
}
@ -263,12 +257,13 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
private final boolean canStartEvent;
private final Guild guild;
private final GuildScheduledEvent guildScheduledEvent;
private final boolean isConnected;
private final boolean isDeveloperMode;
private final boolean isRsvped;
private final GuildScheduledEventLocationInfo locationInfo;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public Initialized(GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5) {
public Initialized(GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6) {
super(null);
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
m.checkNotNullParameter(guildScheduledEventLocationInfo, "locationInfo");
@ -278,33 +273,13 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
this.guild = guild;
this.isRsvped = z2;
this.canShare = z3;
this.canStartEvent = z4;
this.isDeveloperMode = z5;
this.isConnected = z4;
this.canStartEvent = z5;
this.isDeveloperMode = z6;
}
public static /* synthetic */ Initialized copy$default(Initialized initialized, GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, int i, Object obj) {
if ((i & 1) != 0) {
guildScheduledEvent = initialized.guildScheduledEvent;
}
if ((i & 2) != 0) {
guildScheduledEventLocationInfo = initialized.locationInfo;
}
if ((i & 4) != 0) {
guild = initialized.guild;
}
if ((i & 8) != 0) {
z2 = initialized.isRsvped;
}
if ((i & 16) != 0) {
z3 = initialized.canShare;
}
if ((i & 32) != 0) {
z4 = initialized.canStartEvent;
}
if ((i & 64) != 0) {
z5 = initialized.isDeveloperMode;
}
return initialized.copy(guildScheduledEvent, guildScheduledEventLocationInfo, guild, z2, z3, z4, z5);
public static /* synthetic */ Initialized copy$default(Initialized initialized, GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, int i, Object obj) {
return initialized.copy((i & 1) != 0 ? initialized.guildScheduledEvent : guildScheduledEvent, (i & 2) != 0 ? initialized.locationInfo : guildScheduledEventLocationInfo, (i & 4) != 0 ? initialized.guild : guild, (i & 8) != 0 ? initialized.isRsvped : z2, (i & 16) != 0 ? initialized.canShare : z3, (i & 32) != 0 ? initialized.isConnected : z4, (i & 64) != 0 ? initialized.canStartEvent : z5, (i & 128) != 0 ? initialized.isDeveloperMode : z6);
}
public final GuildScheduledEvent component1() {
@ -328,18 +303,22 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
}
public final boolean component6() {
return this.canStartEvent;
return this.isConnected;
}
public final boolean component7() {
return this.canStartEvent;
}
public final boolean component8() {
return this.isDeveloperMode;
}
public final Initialized copy(GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5) {
public final Initialized copy(GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6) {
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
m.checkNotNullParameter(guildScheduledEventLocationInfo, "locationInfo");
m.checkNotNullParameter(guild, "guild");
return new Initialized(guildScheduledEvent, guildScheduledEventLocationInfo, guild, z2, z3, z4, z5);
return new Initialized(guildScheduledEvent, guildScheduledEventLocationInfo, guild, z2, z3, z4, z5, z6);
}
public boolean equals(Object obj) {
@ -350,7 +329,7 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
return false;
}
Initialized initialized = (Initialized) obj;
return m.areEqual(this.guildScheduledEvent, initialized.guildScheduledEvent) && m.areEqual(this.locationInfo, initialized.locationInfo) && m.areEqual(this.guild, initialized.guild) && this.isRsvped == initialized.isRsvped && this.canShare == initialized.canShare && this.canStartEvent == initialized.canStartEvent && this.isDeveloperMode == initialized.isDeveloperMode;
return m.areEqual(this.guildScheduledEvent, initialized.guildScheduledEvent) && m.areEqual(this.locationInfo, initialized.locationInfo) && m.areEqual(this.guild, initialized.guild) && this.isRsvped == initialized.isRsvped && this.canShare == initialized.canShare && this.isConnected == initialized.isConnected && this.canStartEvent == initialized.canStartEvent && this.isDeveloperMode == initialized.isDeveloperMode;
}
public final boolean getCanShare() {
@ -401,7 +380,7 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
int i9 = z3 ? 1 : 0;
int i10 = z3 ? 1 : 0;
int i11 = (i7 + i8) * 31;
boolean z4 = this.canStartEvent;
boolean z4 = this.isConnected;
if (z4) {
z4 = true;
}
@ -409,11 +388,23 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
int i13 = z4 ? 1 : 0;
int i14 = z4 ? 1 : 0;
int i15 = (i11 + i12) * 31;
boolean z5 = this.isDeveloperMode;
if (!z5) {
i3 = z5 ? 1 : 0;
boolean z5 = this.canStartEvent;
if (z5) {
z5 = true;
}
return i15 + i3;
int i16 = z5 ? 1 : 0;
int i17 = z5 ? 1 : 0;
int i18 = z5 ? 1 : 0;
int i19 = (i15 + i16) * 31;
boolean z6 = this.isDeveloperMode;
if (!z6) {
i3 = z6 ? 1 : 0;
}
return i19 + i3;
}
public final boolean isConnected() {
return this.isConnected;
}
public final boolean isDeveloperMode() {
@ -435,6 +426,8 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
P.append(this.isRsvped);
P.append(", canShare=");
P.append(this.canShare);
P.append(", isConnected=");
P.append(this.isConnected);
P.append(", canStartEvent=");
P.append(this.canStartEvent);
P.append(", isDeveloperMode=");
@ -460,7 +453,7 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public GuildScheduledEventDetailsViewModel(long j, ObservationDeck observationDeck, StoreGuildScheduledEvents storeGuildScheduledEvents, StoreGuilds storeGuilds, StoreChannels storeChannels, StorePermissions storePermissions, StoreUserSettings storeUserSettings, Observable<StoreState> observable) {
public GuildScheduledEventDetailsViewModel(long j, ObservationDeck observationDeck, StoreGuildScheduledEvents storeGuildScheduledEvents, StoreGuilds storeGuilds, StoreChannels storeChannels, StorePermissions storePermissions, StoreUserSettings storeUserSettings, StoreVoiceChannelSelected storeVoiceChannelSelected, Observable<StoreState> observable) {
super(null, 1, null);
m.checkNotNullParameter(observationDeck, "observationDeck");
m.checkNotNullParameter(storeGuildScheduledEvents, "guildScheduledEventsStore");
@ -468,6 +461,7 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
m.checkNotNullParameter(storeChannels, "channelsStore");
m.checkNotNullParameter(storePermissions, "permissionsStore");
m.checkNotNullParameter(storeUserSettings, "userSettingsStore");
m.checkNotNullParameter(storeVoiceChannelSelected, "selectedVoiceChannelStore");
m.checkNotNullParameter(observable, "storeStateObservable");
this.guildScheduledEventId = j;
this.guildScheduledEventsStore = storeGuildScheduledEvents;
@ -475,14 +469,15 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
}
/* JADX WARNING: Illegal instructions before constructor call */
public /* synthetic */ GuildScheduledEventDetailsViewModel(long j, ObservationDeck observationDeck, StoreGuildScheduledEvents storeGuildScheduledEvents, StoreGuilds storeGuilds, StoreChannels storeChannels, StorePermissions storePermissions, StoreUserSettings storeUserSettings, Observable observable, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(j, r5, r6, r7, r8, r9, r10, (i & 128) != 0 ? Companion.access$observeStores(Companion, j, r5, r6, r7, r8, r9, r10) : observable);
public /* synthetic */ GuildScheduledEventDetailsViewModel(long j, ObservationDeck observationDeck, StoreGuildScheduledEvents storeGuildScheduledEvents, StoreGuilds storeGuilds, StoreChannels storeChannels, StorePermissions storePermissions, StoreUserSettings storeUserSettings, StoreVoiceChannelSelected storeVoiceChannelSelected, Observable observable, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(j, r5, r6, r7, r8, r9, r10, r11, (i & 256) != 0 ? Companion.access$observeStores(Companion, j, r5, r6, r7, r8, r9, r10, r11) : observable);
ObservationDeck observationDeck2 = (i & 2) != 0 ? ObservationDeckProvider.get() : observationDeck;
StoreGuildScheduledEvents guildScheduledEvents = (i & 4) != 0 ? StoreStream.Companion.getGuildScheduledEvents() : storeGuildScheduledEvents;
StoreGuilds guilds = (i & 8) != 0 ? StoreStream.Companion.getGuilds() : storeGuilds;
StoreChannels channels = (i & 16) != 0 ? StoreStream.Companion.getChannels() : storeChannels;
StorePermissions permissions = (i & 32) != 0 ? StoreStream.Companion.getPermissions() : storePermissions;
StoreUserSettings userSettings = (i & 64) != 0 ? StoreStream.Companion.getUserSettings() : storeUserSettings;
StoreVoiceChannelSelected voiceChannelSelected = (i & 128) != 0 ? StoreStream.Companion.getVoiceChannelSelected() : storeVoiceChannelSelected;
}
public static final /* synthetic */ void access$handleStoreState(GuildScheduledEventDetailsViewModel guildScheduledEventDetailsViewModel, StoreState storeState) {
@ -491,13 +486,30 @@ public final class GuildScheduledEventDetailsViewModel extends AppViewModel<View
private final void handleStoreState(StoreState storeState) {
Object obj;
boolean z2;
if (storeState.getGuildScheduledEvent() == null || storeState.getGuild() == null) {
obj = ViewState.Invalid.INSTANCE;
} else {
if (getViewState() == null) {
this.guildScheduledEventsStore.fetchGuildScheduledEventUserCounts(storeState.getGuild().getId());
}
obj = new ViewState.Initialized(storeState.getGuildScheduledEvent(), GuildScheduledEventLocationInfo.Companion.buildLocationInfo(storeState.getGuildScheduledEvent(), storeState.getChannel()), storeState.getGuild(), storeState.isRsvped(), storeState.getCanShare(), storeState.getCanStartEvent(), storeState.isDeveloperMode());
GuildScheduledEventLocationInfo buildLocationInfo = GuildScheduledEventLocationInfo.Companion.buildLocationInfo(storeState.getGuildScheduledEvent(), storeState.getChannel());
GuildScheduledEvent guildScheduledEvent = storeState.getGuildScheduledEvent();
Guild guild = storeState.getGuild();
boolean isRsvped = storeState.isRsvped();
Long b = storeState.getGuildScheduledEvent().b();
boolean z3 = false;
if (b != null) {
long longValue = b.longValue();
Long selectedVoiceChannelId = storeState.getSelectedVoiceChannelId();
if (selectedVoiceChannelId != null && longValue == selectedVoiceChannelId.longValue()) {
z3 = true;
}
z2 = z3;
} else {
z2 = false;
}
obj = new ViewState.Initialized(guildScheduledEvent, buildLocationInfo, guild, isRsvped, storeState.getCanShare(), z2, storeState.getCanStartEvent(), storeState.isDeveloperMode());
}
updateViewState(obj);
}

View File

@ -139,8 +139,8 @@ public final class GuildScheduledEventItemView extends ConstraintLayout {
private final void configureInternal(GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03, Function0<Unit> function04, Function0<Unit> function05) {
GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView = this.binding.b;
m.checkNotNullExpressionValue(guildScheduledEventBottomButtonView, "binding.guildScheduledEventListItemButtomView");
guildScheduledEventBottomButtonView.setVisibility(new GuildScheduledEventBottomButtonView.VisibilityInfo(guildScheduledEvent, z3, z5, z4, z6).isAnyButtonVisible() ? 0 : 8);
this.binding.b.configure(guildScheduledEvent, z2, z3, z5, z4, z6, function02, function03, function04, function05);
guildScheduledEventBottomButtonView.setVisibility(new GuildScheduledEventBottomButtonView.VisibilityInfo(guildScheduledEvent, z3, z5, z4, z6, false, 32, null).isAnyButtonVisible() ? 0 : 8);
GuildScheduledEventBottomButtonView.configure$default(this.binding.b, guildScheduledEvent, z2, z3, z5, z4, z6, function02, function03, function04, function05, null, 1024, null);
TextView textView = this.binding.j;
m.checkNotNullExpressionValue(textView, "binding.guildScheduledEventListItemRsvpText");
Integer l = guildScheduledEvent.l();

View File

@ -0,0 +1,44 @@
package com.discord.widgets.guildscheduledevent;
import android.content.Context;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: WidgetGuildScheduledEventDetailsBottomSheet.kt */
public final class WidgetGuildScheduledEventDetailsBottomSheet$configureUi$7 extends o implements Function0<Unit> {
public final /* synthetic */ WidgetGuildScheduledEventDetailsBottomSheet this$0;
/* compiled from: WidgetGuildScheduledEventDetailsBottomSheet.kt */
/* renamed from: com.discord.widgets.guildscheduledevent.WidgetGuildScheduledEventDetailsBottomSheet$configureUi$7$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ WidgetGuildScheduledEventDetailsBottomSheet$configureUi$7 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(WidgetGuildScheduledEventDetailsBottomSheet$configureUi$7 widgetGuildScheduledEventDetailsBottomSheet$configureUi$7) {
super(0);
this.this$0 = widgetGuildScheduledEventDetailsBottomSheet$configureUi$7;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
this.this$0.this$0.dismiss();
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetGuildScheduledEventDetailsBottomSheet$configureUi$7(WidgetGuildScheduledEventDetailsBottomSheet widgetGuildScheduledEventDetailsBottomSheet) {
super(0);
this.this$0 = widgetGuildScheduledEventDetailsBottomSheet;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
GuildScheduledEventDetailsViewModel access$getViewModel$p = WidgetGuildScheduledEventDetailsBottomSheet.access$getViewModel$p(this.this$0);
Context requireContext = this.this$0.requireContext();
m.checkNotNullExpressionValue(requireContext, "requireContext()");
access$getViewModel$p.endEventClicked(requireContext, new AnonymousClass1(this));
}
}

View File

@ -17,6 +17,6 @@ public final class WidgetGuildScheduledEventDetailsBottomSheet$viewModel$2 exten
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final AppViewModel<GuildScheduledEventDetailsViewModel.ViewState> mo1invoke() {
return new GuildScheduledEventDetailsViewModel(WidgetGuildScheduledEventDetailsBottomSheet.access$getGuildScheduledEventId$p(this.this$0), null, null, null, null, null, null, null, 254, null);
return new GuildScheduledEventDetailsViewModel(WidgetGuildScheduledEventDetailsBottomSheet.access$getGuildScheduledEventId$p(this.this$0), null, null, null, null, null, null, null, null, 510, null);
}
}

View File

@ -152,7 +152,7 @@ public final class WidgetGuildScheduledEventDetailsBottomSheet extends AppBottom
if (channelLocation != null) {
channel = channelLocation.getChannel();
}
getBinding().b.configureForDetails(initialized.getGuildScheduledEvent(), initialized.isRsvped(), initialized.getCanShare(), initialized.getCanStartEvent(), initialized.isDeveloperMode(), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$2(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$3(this), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$4(this, viewState, channel), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$5(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$6(this, channel));
getBinding().b.configureForDetails(initialized.getGuildScheduledEvent(), initialized.isRsvped(), initialized.isConnected(), initialized.getCanShare(), initialized.getCanStartEvent(), initialized.isDeveloperMode(), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$2(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$3(this), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$4(this, viewState, channel), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$5(this, viewState), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$6(this, channel), new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$7(this));
}
private final long getGuildScheduledEventId() {

View File

@ -17,6 +17,6 @@ public final class WidgetGuildScheduledEventDetailsExtrasBottomSheet$viewModel$2
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final AppViewModel<GuildScheduledEventDetailsViewModel.ViewState> mo1invoke() {
return new GuildScheduledEventDetailsViewModel(WidgetGuildScheduledEventDetailsExtrasBottomSheet.access$getGuildScheduledEventId$p(this.this$0), null, null, null, null, null, null, null, 254, null);
return new GuildScheduledEventDetailsViewModel(WidgetGuildScheduledEventDetailsExtrasBottomSheet.access$getGuildScheduledEventId$p(this.this$0), null, null, null, null, null, null, null, null, 510, null);
}
}

View File

@ -33,7 +33,7 @@ public abstract class ServerSettingsGuildRoleSubscriptionTierAdapterItem impleme
super(null);
m.checkNotNullParameter(guildRoleSubscriptionTierListing, "tierListing");
this.tierListing = guildRoleSubscriptionTierListing;
this.key = String.valueOf(guildRoleSubscriptionTierListing.b());
this.key = String.valueOf(guildRoleSubscriptionTierListing.c());
}
public static /* synthetic */ Tier copy$default(Tier tier, GuildRoleSubscriptionTierListing guildRoleSubscriptionTierListing, int i, Object obj) {

View File

@ -28,7 +28,7 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel$submitChanges$1
public final void invoke(GuildRoleSubscriptionGroupListing guildRoleSubscriptionGroupListing) {
m.checkNotNullParameter(guildRoleSubscriptionGroupListing, "it");
ServerSettingsGuildRoleSubscriptionViewModel.access$updateViewState(this.this$0, ServerSettingsGuildRoleSubscriptionViewModel.ViewState.Loaded.copy$default(this.$viewState, false, false, 0, null, null, null, null, 125, null));
ServerSettingsGuildRoleSubscriptionViewModel.access$updateViewState(this.this$0, ServerSettingsGuildRoleSubscriptionViewModel.ViewState.Loaded.copy$default(this.$viewState, false, false, 0, 0, null, null, null, null, 253, null));
ServerSettingsGuildRoleSubscriptionViewModel.access$emitEvent(this.this$0, ServerSettingsGuildRoleSubscriptionViewModel.Event.SubmitSuccess.INSTANCE);
}
}

View File

@ -28,7 +28,7 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel$submitChanges$2
public final void invoke(Error error) {
m.checkNotNullParameter(error, "error");
ServerSettingsGuildRoleSubscriptionViewModel.access$updateViewState(this.this$0, ServerSettingsGuildRoleSubscriptionViewModel.ViewState.Loaded.copy$default(this.$viewState, false, false, 0, null, null, null, null, 125, null));
ServerSettingsGuildRoleSubscriptionViewModel.access$updateViewState(this.this$0, ServerSettingsGuildRoleSubscriptionViewModel.ViewState.Loaded.copy$default(this.$viewState, false, false, 0, 0, null, null, null, null, 253, null));
ServerSettingsGuildRoleSubscriptionViewModel.access$emitEvent(this.this$0, new ServerSettingsGuildRoleSubscriptionViewModel.Event.SubmitFailure(error));
}
}

View File

@ -225,6 +225,7 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
/* compiled from: ServerSettingsGuildRoleSubscriptionViewModel.kt */
public static final class Loaded extends ViewState {
private final List<ServerSettingsGuildRoleSubscriptionTierAdapterItem> adapterItems;
private final long applicationId;
private final String groupCoverImage;
private final Long groupCoverImageAssetId;
private final String groupDescription;
@ -232,15 +233,16 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
private final boolean hasChanges;
private final boolean isSubmitting;
/* JADX DEBUG: Multi-variable search result rejected for r6v0, resolved type: java.util.List<? extends com.discord.widgets.servers.guild_role_subscription.ServerSettingsGuildRoleSubscriptionTierAdapterItem> */
/* JADX DEBUG: Multi-variable search result rejected for r8v0, resolved type: java.util.List<? extends com.discord.widgets.servers.guild_role_subscription.ServerSettingsGuildRoleSubscriptionTierAdapterItem> */
/* JADX WARN: Multi-variable type inference failed */
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public Loaded(boolean z2, boolean z3, long j, List<? extends ServerSettingsGuildRoleSubscriptionTierAdapterItem> list, String str, Long l, String str2) {
public Loaded(boolean z2, boolean z3, long j, long j2, List<? extends ServerSettingsGuildRoleSubscriptionTierAdapterItem> list, String str, Long l, String str2) {
super(null);
m.checkNotNullParameter(list, "adapterItems");
this.hasChanges = z2;
this.isSubmitting = z3;
this.groupListingId = j;
this.applicationId = j2;
this.adapterItems = list;
this.groupDescription = str;
this.groupCoverImageAssetId = l;
@ -248,12 +250,12 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ Loaded(boolean z2, boolean z3, long j, List list, String str, Long l, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? false : z2, (i & 2) != 0 ? false : z3, j, list, str, l, (i & 64) != 0 ? null : str2);
public /* synthetic */ Loaded(boolean z2, boolean z3, long j, long j2, List list, String str, Long l, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? false : z2, (i & 2) != 0 ? false : z3, j, j2, list, str, l, (i & 128) != 0 ? null : str2);
}
public static /* synthetic */ Loaded copy$default(Loaded loaded, boolean z2, boolean z3, long j, List list, String str, Long l, String str2, int i, Object obj) {
return loaded.copy((i & 1) != 0 ? loaded.hasChanges : z2, (i & 2) != 0 ? loaded.isSubmitting : z3, (i & 4) != 0 ? loaded.groupListingId : j, (i & 8) != 0 ? loaded.adapterItems : list, (i & 16) != 0 ? loaded.groupDescription : str, (i & 32) != 0 ? loaded.groupCoverImageAssetId : l, (i & 64) != 0 ? loaded.groupCoverImage : str2);
public static /* synthetic */ Loaded copy$default(Loaded loaded, boolean z2, boolean z3, long j, long j2, List list, String str, Long l, String str2, int i, Object obj) {
return loaded.copy((i & 1) != 0 ? loaded.hasChanges : z2, (i & 2) != 0 ? loaded.isSubmitting : z3, (i & 4) != 0 ? loaded.groupListingId : j, (i & 8) != 0 ? loaded.applicationId : j2, (i & 16) != 0 ? loaded.adapterItems : list, (i & 32) != 0 ? loaded.groupDescription : str, (i & 64) != 0 ? loaded.groupCoverImageAssetId : l, (i & 128) != 0 ? loaded.groupCoverImage : str2);
}
public final boolean component1() {
@ -268,25 +270,29 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
return this.groupListingId;
}
public final List<ServerSettingsGuildRoleSubscriptionTierAdapterItem> component4() {
public final long component4() {
return this.applicationId;
}
public final List<ServerSettingsGuildRoleSubscriptionTierAdapterItem> component5() {
return this.adapterItems;
}
public final String component5() {
public final String component6() {
return this.groupDescription;
}
public final Long component6() {
public final Long component7() {
return this.groupCoverImageAssetId;
}
public final String component7() {
public final String component8() {
return this.groupCoverImage;
}
public final Loaded copy(boolean z2, boolean z3, long j, List<? extends ServerSettingsGuildRoleSubscriptionTierAdapterItem> list, String str, Long l, String str2) {
public final Loaded copy(boolean z2, boolean z3, long j, long j2, List<? extends ServerSettingsGuildRoleSubscriptionTierAdapterItem> list, String str, Long l, String str2) {
m.checkNotNullParameter(list, "adapterItems");
return new Loaded(z2, z3, j, list, str, l, str2);
return new Loaded(z2, z3, j, j2, list, str, l, str2);
}
public boolean equals(Object obj) {
@ -297,13 +303,17 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
return false;
}
Loaded loaded = (Loaded) obj;
return this.hasChanges == loaded.hasChanges && this.isSubmitting == loaded.isSubmitting && this.groupListingId == loaded.groupListingId && m.areEqual(this.adapterItems, loaded.adapterItems) && m.areEqual(this.groupDescription, loaded.groupDescription) && m.areEqual(this.groupCoverImageAssetId, loaded.groupCoverImageAssetId) && m.areEqual(this.groupCoverImage, loaded.groupCoverImage);
return this.hasChanges == loaded.hasChanges && this.isSubmitting == loaded.isSubmitting && this.groupListingId == loaded.groupListingId && this.applicationId == loaded.applicationId && m.areEqual(this.adapterItems, loaded.adapterItems) && m.areEqual(this.groupDescription, loaded.groupDescription) && m.areEqual(this.groupCoverImageAssetId, loaded.groupCoverImageAssetId) && m.areEqual(this.groupCoverImage, loaded.groupCoverImage);
}
public final List<ServerSettingsGuildRoleSubscriptionTierAdapterItem> getAdapterItems() {
return this.adapterItems;
}
public final long getApplicationId() {
return this.applicationId;
}
public final String getGroupCoverImage() {
return this.groupCoverImage;
}
@ -338,7 +348,7 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
if (!z3) {
i = z3 ? 1 : 0;
}
int a = (b.a(this.groupListingId) + ((i5 + i) * 31)) * 31;
int a = (b.a(this.applicationId) + ((b.a(this.groupListingId) + ((i5 + i) * 31)) * 31)) * 31;
List<ServerSettingsGuildRoleSubscriptionTierAdapterItem> list = this.adapterItems;
int i6 = 0;
int hashCode = (a + (list != null ? list.hashCode() : 0)) * 31;
@ -364,6 +374,8 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
P.append(this.isSubmitting);
P.append(", groupListingId=");
P.append(this.groupListingId);
P.append(", applicationId=");
P.append(this.applicationId);
P.append(", adapterItems=");
P.append(this.adapterItems);
P.append(", groupDescription=");
@ -443,7 +455,7 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
return;
}
this.guildRoleSubscriptionGroupListing = guildRoleSubscriptionGroupListing;
updateViewState(new ViewState.Loaded(false, false, guildRoleSubscriptionGroupListing.c(), ServerSettingsGuildRoleSubscriptionTierListItemGeneratorKt.generateServerSettingsGuildRoleSubscriptionTierListItems(guildRoleSubscriptionGroupListing.f(), 3), guildRoleSubscriptionGroupListing.b(), Long.valueOf(guildRoleSubscriptionGroupListing.d()), null, 67, null));
updateViewState(new ViewState.Loaded(false, false, guildRoleSubscriptionGroupListing.d(), guildRoleSubscriptionGroupListing.b(), ServerSettingsGuildRoleSubscriptionTierListItemGeneratorKt.generateServerSettingsGuildRoleSubscriptionTierListItems(guildRoleSubscriptionGroupListing.g(), 3), guildRoleSubscriptionGroupListing.c(), Long.valueOf(guildRoleSubscriptionGroupListing.e()), null, 131, null));
} else if (guildRoleSubscriptionGroupState instanceof StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState.Failed) {
updateViewState(ViewState.Failed.INSTANCE);
}
@ -458,15 +470,15 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
public final void submitChanges() {
GuildRoleSubscriptionGroupListing guildRoleSubscriptionGroupListing = this.guildRoleSubscriptionGroupListing;
if (guildRoleSubscriptionGroupListing != null) {
long c2 = guildRoleSubscriptionGroupListing.c();
long d = guildRoleSubscriptionGroupListing.d();
ViewState requireViewState = requireViewState();
if (!(requireViewState instanceof ViewState.Loaded)) {
requireViewState = null;
}
ViewState.Loaded loaded = (ViewState.Loaded) requireViewState;
if (loaded != null) {
updateViewState(ViewState.Loaded.copy$default(loaded, false, true, 0, null, null, null, null, 125, null));
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(GuildRoleSubscriptionUtils.INSTANCE.updateGuildRoleSubscriptionGroupListing(this.restApi, this.storeGuildRoleSubscriptions, this.guildId, c2, loaded.getGroupCoverImage(), loaded.getGroupDescription()), this, null, 2, null), ServerSettingsGuildRoleSubscriptionViewModel.class, (Context) null, (Function1) null, new ServerSettingsGuildRoleSubscriptionViewModel$submitChanges$2(this, loaded), (Function0) null, (Function0) null, new ServerSettingsGuildRoleSubscriptionViewModel$submitChanges$1(this, loaded), 54, (Object) null);
updateViewState(ViewState.Loaded.copy$default(loaded, false, true, 0, 0, null, null, null, null, 253, null));
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(GuildRoleSubscriptionUtils.INSTANCE.updateGuildRoleSubscriptionGroupListing(this.restApi, this.storeGuildRoleSubscriptions, this.guildId, d, loaded.getGroupCoverImage(), loaded.getGroupDescription()), this, null, 2, null), ServerSettingsGuildRoleSubscriptionViewModel.class, (Context) null, (Function1) null, new ServerSettingsGuildRoleSubscriptionViewModel$submitChanges$2(this, loaded), (Function0) null, (Function0) null, new ServerSettingsGuildRoleSubscriptionViewModel$submitChanges$1(this, loaded), 54, (Object) null);
}
}
}
@ -484,15 +496,15 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
String groupDescription = loaded.getGroupDescription();
GuildRoleSubscriptionGroupListing guildRoleSubscriptionGroupListing = this.guildRoleSubscriptionGroupListing;
if (guildRoleSubscriptionGroupListing != null) {
str2 = guildRoleSubscriptionGroupListing.b();
str2 = guildRoleSubscriptionGroupListing.c();
}
if (!(!m.areEqual(groupDescription, str2))) {
z2 = false;
updateViewState(ViewState.Loaded.copy$default(loaded, z2, false, 0, null, null, null, str, 62, null));
updateViewState(ViewState.Loaded.copy$default(loaded, z2, false, 0, 0, null, null, null, str, 126, null));
}
}
z2 = true;
updateViewState(ViewState.Loaded.copy$default(loaded, z2, false, 0, null, null, null, str, 62, null));
updateViewState(ViewState.Loaded.copy$default(loaded, z2, false, 0, 0, null, null, null, str, 126, null));
}
}
@ -506,9 +518,9 @@ public final class ServerSettingsGuildRoleSubscriptionViewModel extends AppViewM
if (loaded != null) {
GuildRoleSubscriptionGroupListing guildRoleSubscriptionGroupListing = this.guildRoleSubscriptionGroupListing;
if (guildRoleSubscriptionGroupListing != null) {
str2 = guildRoleSubscriptionGroupListing.b();
str2 = guildRoleSubscriptionGroupListing.c();
}
updateViewState(ViewState.Loaded.copy$default(loaded, (m.areEqual(str2, str) ^ true) || loaded.getGroupCoverImage() != null, false, 0, null, str, null, null, 110, null));
updateViewState(ViewState.Loaded.copy$default(loaded, (m.areEqual(str2, str) ^ true) || loaded.getGroupCoverImage() != null, false, 0, 0, null, str, null, null, 222, null));
}
}
}

View File

@ -83,15 +83,15 @@ public abstract class TierViewHolder extends RecyclerView.ViewHolder {
this.itemView.setOnClickListener(new TierViewHolder$TierItemViewHolder$configureUI$1(itemClickListener, tierListing));
TextView textView = this.binding.d;
m.checkNotNullExpressionValue(textView, "binding.guildRoleSubscriptionTierName");
textView.setText(tierListing.d());
textView.setText(tierListing.e());
f.coerceAtMost(IconUtils.getMediaProxySize(this.tierImageSizePx), 64);
TextView textView2 = this.binding.b;
m.checkNotNullExpressionValue(textView2, "binding.guildRoleSubscriptionTierDraftTag");
int i = 0;
textView2.setVisibility(tierListing.e() ^ true ? 0 : 8);
textView2.setVisibility(tierListing.f() ^ true ? 0 : 8);
TextView textView3 = this.binding.f1694c;
m.checkNotNullExpressionValue(textView3, "binding.guildRoleSubscriptionTierMemberCount");
if (!tierListing.e()) {
if (!tierListing.f()) {
i = 4;
}
textView3.setVisibility(i);

View File

@ -24,6 +24,6 @@ public final class WidgetServerSettingsGuildRoleSubscriptions$configureUI$1 impl
@Override // com.discord.widgets.servers.guild_role_subscription.ServerSettingsGuildRoleSubscriptionTierAdapter.ItemClickListener
public void onTierItemClick(GuildRoleSubscriptionTierListing guildRoleSubscriptionTierListing) {
m.checkNotNullParameter(guildRoleSubscriptionTierListing, "tierListing");
WidgetServerSettingsGuildRoleSubscriptionEditTier.Companion.launch(this.this$0.requireContext(), WidgetServerSettingsGuildRoleSubscriptions.access$getGuildId$p(this.this$0), this.$loadedViewState.getGroupListingId(), guildRoleSubscriptionTierListing.b());
WidgetServerSettingsGuildRoleSubscriptionEditTier.Companion.launch(this.this$0.requireContext(), WidgetServerSettingsGuildRoleSubscriptions.access$getGuildId$p(this.this$0), this.$loadedViewState.getGroupListingId(), guildRoleSubscriptionTierListing.c());
}
}

View File

@ -96,7 +96,7 @@ public final class WidgetServerSettingsGuildRoleSubscriptions extends AppFragmen
if (!(groupCoverImage == null || t.isBlank(groupCoverImage))) {
getBinding().f1970c.configureUI(loaded.getGroupDescription(), loaded.getGroupCoverImage());
} else if (loaded.getGroupCoverImageAssetId() != null) {
getBinding().f1970c.configureUI(loaded.getGroupDescription(), loaded.getGroupCoverImageAssetId().longValue());
getBinding().f1970c.configureUI(loaded.getGroupDescription(), loaded.getApplicationId(), loaded.getGroupCoverImageAssetId().longValue());
}
FloatingActionButton floatingActionButton = getBinding().d;
m.checkNotNullExpressionValue(floatingActionButton, "binding.serverSettingsGuildRoleSubscriptionSave");

View File

@ -1,30 +1,30 @@
package com.discord.widgets.servers.guild_role_subscription.edit_tier;
import com.discord.api.channel.Channel;
import com.discord.stores.StoreChannels;
import com.discord.stores.StoreEmoji;
import com.discord.stores.StoreGuildRoleSubscriptions;
import com.discord.widgets.servers.guild_role_subscription.edit_tier.ServerSettingsGuildRoleSubscriptionEditTierViewModel;
import d0.z.d.o;
import java.util.Map;
import kotlin.Pair;
import kotlin.jvm.functions.Function0;
/* compiled from: ServerSettingsGuildRoleSubscriptionEditTierViewModel.kt */
public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel$Companion$observeStoreState$1 extends o implements Function0<ServerSettingsGuildRoleSubscriptionEditTierViewModel.StoreState> {
public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel$Companion$observeStoreState$1 extends o implements Function0<Pair<? extends StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState, ? extends Map<Long, ? extends Channel>>> {
public final /* synthetic */ long $guildId;
public final /* synthetic */ StoreChannels $storeChannels;
public final /* synthetic */ StoreEmoji $storeEmoji;
public final /* synthetic */ StoreGuildRoleSubscriptions $storeGuildRoleSubscriptions;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ServerSettingsGuildRoleSubscriptionEditTierViewModel$Companion$observeStoreState$1(StoreGuildRoleSubscriptions storeGuildRoleSubscriptions, long j, StoreChannels storeChannels, StoreEmoji storeEmoji) {
public ServerSettingsGuildRoleSubscriptionEditTierViewModel$Companion$observeStoreState$1(StoreGuildRoleSubscriptions storeGuildRoleSubscriptions, long j, StoreChannels storeChannels) {
super(0);
this.$storeGuildRoleSubscriptions = storeGuildRoleSubscriptions;
this.$guildId = j;
this.$storeChannels = storeChannels;
this.$storeEmoji = storeEmoji;
}
/* Return type fixed from 'kotlin.Pair<com.discord.stores.StoreGuildRoleSubscriptions$GuildRoleSubscriptionGroupState, java.util.Map<java.lang.Long, com.discord.api.channel.Channel>>' to match base method */
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final ServerSettingsGuildRoleSubscriptionEditTierViewModel.StoreState mo1invoke() {
return new ServerSettingsGuildRoleSubscriptionEditTierViewModel.StoreState(this.$storeChannels.getChannelsForGuild(this.$guildId), this.$storeEmoji.getUnicodeEmojisNamesMap(), this.$storeGuildRoleSubscriptions.getGuildRoleSubscriptionState(this.$guildId));
public final Pair<? extends StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState, ? extends Map<Long, ? extends Channel>> mo1invoke() {
return new Pair<>(this.$storeGuildRoleSubscriptions.getGuildRoleSubscriptionState(this.$guildId), this.$storeChannels.getChannelsForGuild(this.$guildId));
}
}

View File

@ -0,0 +1,27 @@
package com.discord.widgets.servers.guild_role_subscription.edit_tier;
import com.discord.api.channel.Channel;
import com.discord.models.domain.emoji.EmojiSet;
import com.discord.stores.StoreGuildRoleSubscriptions;
import com.discord.widgets.servers.guild_role_subscription.edit_tier.ServerSettingsGuildRoleSubscriptionEditTierViewModel;
import d0.z.d.m;
import java.util.Map;
import kotlin.Pair;
import rx.functions.Func2;
/* compiled from: ServerSettingsGuildRoleSubscriptionEditTierViewModel.kt */
public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel$Companion$observeStoreState$2<T1, T2, R> implements Func2<EmojiSet, Pair<? extends StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState, ? extends Map<Long, ? extends Channel>>, ServerSettingsGuildRoleSubscriptionEditTierViewModel.StoreState> {
public static final ServerSettingsGuildRoleSubscriptionEditTierViewModel$Companion$observeStoreState$2 INSTANCE = new ServerSettingsGuildRoleSubscriptionEditTierViewModel$Companion$observeStoreState$2();
public final ServerSettingsGuildRoleSubscriptionEditTierViewModel.StoreState call(EmojiSet emojiSet, Pair<? extends StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState, ? extends Map<Long, Channel>> pair) {
Map map = (Map) pair.component2();
m.checkNotNullExpressionValue(emojiSet, "emojiSet");
return new ServerSettingsGuildRoleSubscriptionEditTierViewModel.StoreState(map, emojiSet, (StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState) pair.component1());
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
@Override // rx.functions.Func2
public /* bridge */ /* synthetic */ ServerSettingsGuildRoleSubscriptionEditTierViewModel.StoreState call(EmojiSet emojiSet, Pair<? extends StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState, ? extends Map<Long, ? extends Channel>> pair) {
return call(emojiSet, (Pair<? extends StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState, ? extends Map<Long, Channel>>) pair);
}
}

View File

@ -13,6 +13,7 @@ import com.discord.api.guildrolesubscription.GuildRoleSubscriptionTierListing;
import com.discord.api.premium.SubscriptionPlan;
import com.discord.app.AppViewModel;
import com.discord.models.domain.emoji.Emoji;
import com.discord.models.domain.emoji.EmojiSet;
import com.discord.stores.StoreChannels;
import com.discord.stores.StoreEmoji;
import com.discord.stores.StoreGuildRoleSubscriptions;
@ -95,7 +96,9 @@ public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel extends
}
private final Observable<StoreState> observeStoreState(long j, ObservationDeck observationDeck, StoreGuildRoleSubscriptions storeGuildRoleSubscriptions, StoreChannels storeChannels, StoreEmoji storeEmoji) {
return ObservationDeck.connectRx$default(observationDeck, new ObservationDeck.UpdateSource[]{storeGuildRoleSubscriptions, storeChannels}, false, null, null, new ServerSettingsGuildRoleSubscriptionEditTierViewModel$Companion$observeStoreState$1(storeGuildRoleSubscriptions, j, storeChannels, storeEmoji), 14, null);
Observable<StoreState> j2 = Observable.j(storeEmoji.getEmojiSet(new StoreEmoji.EmojiContext.Guild(j), false, false), ObservationDeck.connectRx$default(observationDeck, new ObservationDeck.UpdateSource[]{storeGuildRoleSubscriptions, storeChannels}, false, null, null, new ServerSettingsGuildRoleSubscriptionEditTierViewModel$Companion$observeStoreState$1(storeGuildRoleSubscriptions, j, storeChannels), 14, null), ServerSettingsGuildRoleSubscriptionEditTierViewModel$Companion$observeStoreState$2.INSTANCE);
m.checkNotNullExpressionValue(j2, "Observable.combineLatest…ubscriptionState)\n }");
return j2;
}
}
@ -185,39 +188,37 @@ public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel extends
/* compiled from: ServerSettingsGuildRoleSubscriptionEditTierViewModel.kt */
public static final class StoreState {
private final Map<Long, Channel> channels;
private final Map<String, Emoji> guildEmojis;
private final EmojiSet guildEmojis;
private final StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState guildRoleSubscriptionGroupListingState;
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: java.util.Map<java.lang.String, ? extends com.discord.models.domain.emoji.Emoji> */
/* JADX WARN: Multi-variable type inference failed */
public StoreState(Map<Long, Channel> map, Map<String, ? extends Emoji> map2, StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState guildRoleSubscriptionGroupState) {
public StoreState(Map<Long, Channel> map, EmojiSet emojiSet, StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState guildRoleSubscriptionGroupState) {
m.checkNotNullParameter(map, "channels");
m.checkNotNullParameter(map2, "guildEmojis");
m.checkNotNullParameter(emojiSet, "guildEmojis");
this.channels = map;
this.guildEmojis = map2;
this.guildEmojis = emojiSet;
this.guildRoleSubscriptionGroupListingState = guildRoleSubscriptionGroupState;
}
/* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.servers.guild_role_subscription.edit_tier.ServerSettingsGuildRoleSubscriptionEditTierViewModel$StoreState */
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ StoreState copy$default(StoreState storeState, Map map, Map map2, StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState guildRoleSubscriptionGroupState, int i, Object obj) {
public static /* synthetic */ StoreState copy$default(StoreState storeState, Map map, EmojiSet emojiSet, StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState guildRoleSubscriptionGroupState, int i, Object obj) {
if ((i & 1) != 0) {
map = storeState.channels;
}
if ((i & 2) != 0) {
map2 = storeState.guildEmojis;
emojiSet = storeState.guildEmojis;
}
if ((i & 4) != 0) {
guildRoleSubscriptionGroupState = storeState.guildRoleSubscriptionGroupListingState;
}
return storeState.copy(map, map2, guildRoleSubscriptionGroupState);
return storeState.copy(map, emojiSet, guildRoleSubscriptionGroupState);
}
public final Map<Long, Channel> component1() {
return this.channels;
}
public final Map<String, Emoji> component2() {
public final EmojiSet component2() {
return this.guildEmojis;
}
@ -225,10 +226,10 @@ public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel extends
return this.guildRoleSubscriptionGroupListingState;
}
public final StoreState copy(Map<Long, Channel> map, Map<String, ? extends Emoji> map2, StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState guildRoleSubscriptionGroupState) {
public final StoreState copy(Map<Long, Channel> map, EmojiSet emojiSet, StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState guildRoleSubscriptionGroupState) {
m.checkNotNullParameter(map, "channels");
m.checkNotNullParameter(map2, "guildEmojis");
return new StoreState(map, map2, guildRoleSubscriptionGroupState);
m.checkNotNullParameter(emojiSet, "guildEmojis");
return new StoreState(map, emojiSet, guildRoleSubscriptionGroupState);
}
public boolean equals(Object obj) {
@ -246,7 +247,7 @@ public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel extends
return this.channels;
}
public final Map<String, Emoji> getGuildEmojis() {
public final EmojiSet getGuildEmojis() {
return this.guildEmojis;
}
@ -258,8 +259,8 @@ public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel extends
Map<Long, Channel> map = this.channels;
int i = 0;
int hashCode = (map != null ? map.hashCode() : 0) * 31;
Map<String, Emoji> map2 = this.guildEmojis;
int hashCode2 = (hashCode + (map2 != null ? map2.hashCode() : 0)) * 31;
EmojiSet emojiSet = this.guildEmojis;
int hashCode2 = (hashCode + (emojiSet != null ? emojiSet.hashCode() : 0)) * 31;
StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState guildRoleSubscriptionGroupState = this.guildRoleSubscriptionGroupListingState;
if (guildRoleSubscriptionGroupState != null) {
i = guildRoleSubscriptionGroupState.hashCode();
@ -487,15 +488,16 @@ public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel extends
this.eventSubject.j.onNext(event);
}
private final void handleLoadedStoreState(StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState.Loaded loaded, Map<Long, Channel> map, Map<String, ? extends Emoji> map2) {
List<GuildRoleSubscriptionTierListing> f;
private final void handleLoadedStoreState(StoreGuildRoleSubscriptions.GuildRoleSubscriptionGroupState.Loaded loaded, Map<Long, Channel> map, EmojiSet emojiSet) {
List<GuildRoleSubscriptionTierListing> g;
ViewState.Loaded loaded2;
int i;
Object obj;
String str;
boolean z2;
GuildRoleSubscriptionGroupListing guildRoleSubscriptionGroupListing = loaded.getGuildRoleSubscriptionGroupListing();
if (!(guildRoleSubscriptionGroupListing == null || (f = guildRoleSubscriptionGroupListing.f()) == null)) {
Iterator<T> it = f.iterator();
if (!(guildRoleSubscriptionGroupListing == null || (g = guildRoleSubscriptionGroupListing.g()) == null)) {
Iterator<T> it = g.iterator();
while (true) {
loaded2 = null;
i = 0;
@ -504,7 +506,7 @@ public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel extends
break;
}
obj = it.next();
if (((GuildRoleSubscriptionTierListing) obj).b() == this.guildRoleSubscriptionTierListingId) {
if (((GuildRoleSubscriptionTierListing) obj).c() == this.guildRoleSubscriptionTierListingId) {
z2 = true;
continue;
} else {
@ -519,15 +521,22 @@ public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel extends
if (guildRoleSubscriptionTierListing != null) {
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (GuildRoleSubscriptionBenefit guildRoleSubscriptionBenefit : guildRoleSubscriptionTierListing.f().a()) {
int ordinal = guildRoleSubscriptionBenefit.d().ordinal();
if (ordinal == 1) {
Channel channel = map.get(guildRoleSubscriptionBenefit.c());
if (channel != null) {
arrayList.add(new Benefit.ChannelBenefit(AnimatableValueParser.y0(channel), channel.h(), (Emoji) u.first(map2.values()), guildRoleSubscriptionBenefit.a(), Integer.valueOf(GuildChannelIconUtilsKt.guildChannelIcon(channel))));
for (GuildRoleSubscriptionBenefit guildRoleSubscriptionBenefit : guildRoleSubscriptionTierListing.g().a()) {
Long b = guildRoleSubscriptionBenefit.b();
if (b == null || (str = String.valueOf(b.longValue())) == null) {
str = guildRoleSubscriptionBenefit.c();
}
Emoji emoji = emojiSet.emojiIndex.get(str);
if (emoji != null) {
int ordinal = guildRoleSubscriptionBenefit.f().ordinal();
if (ordinal == 1) {
Channel channel = map.get(guildRoleSubscriptionBenefit.e());
if (channel != null) {
arrayList.add(new Benefit.ChannelBenefit(AnimatableValueParser.y0(channel), channel.h(), emoji, guildRoleSubscriptionBenefit.a(), Integer.valueOf(GuildChannelIconUtilsKt.guildChannelIcon(channel))));
}
} else if (ordinal == 2) {
arrayList2.add(new Benefit.IntangibleBenefit(guildRoleSubscriptionBenefit.d(), emoji, guildRoleSubscriptionBenefit.a()));
}
} else if (ordinal == 2) {
arrayList2.add(new Benefit.IntangibleBenefit(guildRoleSubscriptionBenefit.b(), (Emoji) u.first(map2.values()), guildRoleSubscriptionBenefit.a()));
}
}
ViewState requireViewState = requireViewState();
@ -537,20 +546,21 @@ public final class ServerSettingsGuildRoleSubscriptionEditTierViewModel extends
ViewState.Loaded loaded3 = loaded2;
boolean hasChanges = loaded3 != null ? loaded3.getHasChanges() : false;
if (!hasChanges) {
String d = guildRoleSubscriptionTierListing.d();
String a = guildRoleSubscriptionTierListing.a();
Long c2 = guildRoleSubscriptionTierListing.c();
SubscriptionPlan subscriptionPlan = (SubscriptionPlan) u.getOrNull(guildRoleSubscriptionTierListing.h(), 0);
String e = guildRoleSubscriptionTierListing.e();
Long valueOf = Long.valueOf(guildRoleSubscriptionTierListing.a());
String b2 = guildRoleSubscriptionTierListing.b();
Long d = guildRoleSubscriptionTierListing.d();
SubscriptionPlan subscriptionPlan = (SubscriptionPlan) u.getOrNull(guildRoleSubscriptionTierListing.i(), 0);
if (subscriptionPlan != null) {
i = subscriptionPlan.d();
}
GuildRoleSubscriptionTier guildRoleSubscriptionTier = new GuildRoleSubscriptionTier(d, Integer.valueOf(i), null, null, null, c2, a, Boolean.valueOf(guildRoleSubscriptionTierListing.e()), arrayList, arrayList2, 28, null);
GuildRoleSubscriptionTier guildRoleSubscriptionTier = new GuildRoleSubscriptionTier(e, valueOf, Integer.valueOf(i), null, null, null, d, b2, Boolean.valueOf(guildRoleSubscriptionTierListing.f()), arrayList, arrayList2, 56, null);
this.storedGuildRoleSubscriptionTier = guildRoleSubscriptionTier;
this.eventSubject.j.onNext(new Event.StoredStateUpdate(guildRoleSubscriptionTier));
updateViewState(new ViewState.Loaded(guildRoleSubscriptionTierListing.g(), false, guildRoleSubscriptionTierListing.e(), false, 10, null));
updateViewState(new ViewState.Loaded(guildRoleSubscriptionTierListing.h(), false, guildRoleSubscriptionTierListing.f(), false, 10, null));
return;
}
updateViewState(new ViewState.Loaded(guildRoleSubscriptionTierListing.g(), hasChanges, guildRoleSubscriptionTierListing.e(), false, 8, null));
updateViewState(new ViewState.Loaded(guildRoleSubscriptionTierListing.h(), hasChanges, guildRoleSubscriptionTierListing.f(), false, 8, null));
}
}
}

View File

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

View File

@ -129,7 +129,7 @@ public final class WidgetUserSetCustomStatus extends AppFragment {
private final void openEmojiPicker() {
FragmentManager parentFragmentManager = getParentFragmentManager();
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
EmojiPickerNavigator.launchBottomSheet$default(parentFragmentManager, new WidgetUserSetCustomStatus$openEmojiPicker$1(this), EmojiPickerContextType.GLOBAL, null, 8, null);
EmojiPickerNavigator.launchBottomSheet$default(parentFragmentManager, new WidgetUserSetCustomStatus$openEmojiPicker$1(this), EmojiPickerContextType.Global.INSTANCE, null, 8, null);
}
private final void setExpirationOnCheck(MaterialRadioButton materialRadioButton, WidgetUserSetCustomStatusViewModel.FormState.Expiration expiration) {

View File

@ -1076,7 +1076,7 @@
<string name="build_override_for">Build Override for {releaseChannel}</string>
<string name="build_override_id">Build ID</string>
<string name="build_override_incompatible_client">{releaseChannel} client only</string>
<string name="build_override_incompatible_targets">{supportedTargets} targets only</string>
<string name="build_override_incompatible_targets">{requestedTargets} targets not supported by this build</string>
<string name="build_override_invalid">Invalid build override</string>
<string name="build_override_invalid_user">Incorrect user</string>
<string name="build_override_isnt_available">Build isn\'t available</string>

View File

@ -1076,7 +1076,7 @@
<string name="build_override_for">[βûîļð ÖVéŕŕîðé ƒöŕ »{releaseChannel}« one two three]</string>
<string name="build_override_id">[βûîļð ÎÐ one two]</string>
<string name="build_override_incompatible_client">[»{releaseChannel}« çļîéñţ öñļý one two]</string>
<string name="build_override_incompatible_targets">[»{supportedTargets}« ţåŕĝéţš öñļý one two]</string>
<string name="build_override_incompatible_targets">[»{requestedTargets}« ţåŕĝéţš ñöţ šûþþöŕţéð ɓý ţĥîš ɓûîļð one two three four five]</string>
<string name="build_override_invalid">[ÎñVåļîð ɓûîļð öVéŕŕîðé one two three]</string>
<string name="build_override_invalid_user">[Îñçöŕŕéçţ ûšéŕ one two three]</string>
<string name="build_override_isnt_available">[βûîļð îšñ\'ţ åVåîļåɓļé one two three]</string>

View File

@ -1078,7 +1078,7 @@
<string name="build_override_for">Build Override for {releaseChannel}</string>
<string name="build_override_id">Build ID</string>
<string name="build_override_incompatible_client">{releaseChannel} client only</string>
<string name="build_override_incompatible_targets">{supportedTargets} targets only</string>
<string name="build_override_incompatible_targets">{requestedTargets} targets not supported by this build</string>
<string name="build_override_invalid">Invalid build override</string>
<string name="build_override_invalid_user">Incorrect user</string>
<string name="build_override_isnt_available">Build isn\'t available</string>
@ -1427,7 +1427,7 @@
<string name="color_picker_title">Select a color</string>
<string name="color_picker_transparency">Transparency</string>
<string name="color_picker_use_default">Use Default</string>
<string name="res_2131887507_com_crashlytics_android_build_id">0c2a5d273223415f820afc976c5ef272</string>
<string name="res_2131887507_com_crashlytics_android_build_id">d1b727a42b68499386009dae28706dc5</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_item">{applicationName} application</string>