diff --git a/app/build.gradle b/app/build.gradle index d623e33063..96e34189fa 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { applicationId 'com.discord' minSdkVersion 21 targetSdkVersion 29 - versionCode 92201 - versionName "92.1 - Alpha" + versionCode 92202 + versionName "92.2 - Alpha" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 11f3928eb6..e27ec213be 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/app/src/main/java/com/discord/databinding/GuildScheduledEventItemViewBinding.java b/app/src/main/java/com/discord/databinding/GuildScheduledEventItemViewBinding.java index b8c968d97a..48a0dc649a 100644 --- a/app/src/main/java/com/discord/databinding/GuildScheduledEventItemViewBinding.java +++ b/app/src/main/java/com/discord/databinding/GuildScheduledEventItemViewBinding.java @@ -4,6 +4,7 @@ import android.view.View; import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; +import androidx.constraintlayout.widget.Barrier; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.viewbinding.ViewBinding; import com.discord.utilities.view.text.LinkifiedTextView; @@ -40,7 +41,7 @@ public final class GuildScheduledEventItemViewBinding implements ViewBinding { @NonNull public final TextView m; - public GuildScheduledEventItemViewBinding(@NonNull ConstraintLayout constraintLayout, @NonNull GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView, @NonNull ConstraintLayout constraintLayout2, @NonNull GuildScheduledEventDateView guildScheduledEventDateView, @NonNull LinkifiedTextView linkifiedTextView, @NonNull TextView textView, @NonNull SimpleDraweeView simpleDraweeView, @NonNull TextView textView2, @NonNull TextView textView3, @NonNull TextView textView4, @NonNull TextView textView5, @NonNull ImageView imageView, @NonNull TextView textView6) { + public GuildScheduledEventItemViewBinding(@NonNull ConstraintLayout constraintLayout, @NonNull GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView, @NonNull ConstraintLayout constraintLayout2, @NonNull GuildScheduledEventDateView guildScheduledEventDateView, @NonNull LinkifiedTextView linkifiedTextView, @NonNull TextView textView, @NonNull SimpleDraweeView simpleDraweeView, @NonNull TextView textView2, @NonNull TextView textView3, @NonNull TextView textView4, @NonNull TextView textView5, @NonNull Barrier barrier, @NonNull ImageView imageView, @NonNull TextView textView6) { this.a = constraintLayout; this.b = guildScheduledEventBottomButtonView; this.f1636c = constraintLayout2; diff --git a/app/src/main/java/com/discord/databinding/VoiceUserListItemEventBinding.java b/app/src/main/java/com/discord/databinding/VoiceUserListItemEventBinding.java new file mode 100644 index 0000000000..74d79519ec --- /dev/null +++ b/app/src/main/java/com/discord/databinding/VoiceUserListItemEventBinding.java @@ -0,0 +1,24 @@ +package com.discord.databinding; + +import android.view.View; +import android.widget.FrameLayout; +import androidx.annotation.NonNull; +import androidx.viewbinding.ViewBinding; +import com.discord.widgets.guildscheduledevent.GuildScheduledEventItemView; +public final class VoiceUserListItemEventBinding implements ViewBinding { + @NonNull + public final FrameLayout a; + @NonNull + public final GuildScheduledEventItemView b; + + public VoiceUserListItemEventBinding(@NonNull FrameLayout frameLayout, @NonNull GuildScheduledEventItemView guildScheduledEventItemView) { + this.a = frameLayout; + this.b = guildScheduledEventItemView; + } + + @Override // androidx.viewbinding.ViewBinding + @NonNull + public View getRoot() { + return this.a; + } +} diff --git a/app/src/main/java/com/discord/utilities/guildscheduledevent/GuildScheduledEventUtilities.java b/app/src/main/java/com/discord/utilities/guildscheduledevent/GuildScheduledEventUtilities.java index d76e2db40e..6634bb012a 100644 --- a/app/src/main/java/com/discord/utilities/guildscheduledevent/GuildScheduledEventUtilities.java +++ b/app/src/main/java/com/discord/utilities/guildscheduledevent/GuildScheduledEventUtilities.java @@ -163,16 +163,7 @@ public final class GuildScheduledEventUtilities { ArrayList arrayList = new ArrayList(); for (Object obj : values) { Channel channel = (Channel) obj; - Long l = (Long) a.c(channel, permissionsByChannel); - boolean z2 = false; - if (l != null && PermissionUtils.can(0, l)) { - if (AnimatableValueParser.x1(channel)) { - z2 = PermissionUtils.can(20971536, l); - } else if (AnimatableValueParser.D1(channel)) { - z2 = PermissionUtils.can(0, l); - } - } - if (z2) { + if (GuildScheduledEventUtilities.Companion.canStartEventInChannel(channel, (Long) a.c(channel, permissionsByChannel))) { arrayList.add(obj); } } diff --git a/app/src/main/java/com/discord/widgets/auth/WidgetAuthMfa$onViewBound$1.java b/app/src/main/java/com/discord/widgets/auth/WidgetAuthMfa$onViewBound$1.java index f9628cd1d9..eceab6956e 100644 --- a/app/src/main/java/com/discord/widgets/auth/WidgetAuthMfa$onViewBound$1.java +++ b/app/src/main/java/com/discord/widgets/auth/WidgetAuthMfa$onViewBound$1.java @@ -16,10 +16,10 @@ public final class WidgetAuthMfa$onViewBound$1 implements Action2 implements Ac public final void call(MenuItem menuItem, Context context) { m.checkNotNullExpressionValue(menuItem, "menuItem"); switch (menuItem.getItemId()) { - case R.id.menu_channel_settings_delete /* 2131364169 */: + case R.id.menu_channel_settings_delete /* 2131364171 */: if (this.$this_configureUI.isPublicGuildRulesChannel() || this.$this_configureUI.isPublicGuildUpdatesChannel()) { WidgetTextChannelSettings.access$cannotDeleteWarn(this.this$0, this.$this_configureUI.isPublicGuildRulesChannel()); return; @@ -29,7 +29,7 @@ public final class WidgetTextChannelSettings$configureUI$1 implements Ac WidgetTextChannelSettings.access$confirmDelete(this.this$0, this.$this_configureUI.getChannel()); return; } - case R.id.menu_channel_settings_reset /* 2131364170 */: + case R.id.menu_channel_settings_reset /* 2131364172 */: StoreUserGuildSettings userGuildSettings = StoreStream.Companion.getUserGuildSettings(); m.checkNotNullExpressionValue(context, "context"); userGuildSettings.setChannelNotificationsDefault(context, this.$this_configureUI.getChannel()); diff --git a/app/src/main/java/com/discord/widgets/channels/threads/browser/WidgetThreadBrowser$updateMenu$1.java b/app/src/main/java/com/discord/widgets/channels/threads/browser/WidgetThreadBrowser$updateMenu$1.java index 420283994b..db75721d0c 100644 --- a/app/src/main/java/com/discord/widgets/channels/threads/browser/WidgetThreadBrowser$updateMenu$1.java +++ b/app/src/main/java/com/discord/widgets/channels/threads/browser/WidgetThreadBrowser$updateMenu$1.java @@ -19,11 +19,11 @@ public final class WidgetThreadBrowser$updateMenu$1 implements Action2 implements Actio public final void call(MenuItem menuItem, Context context) { m.checkNotNullExpressionValue(menuItem, "menuItem"); switch (menuItem.getItemId()) { - case R.id.menu_friends_add_friend /* 2131364189 */: + case R.id.menu_friends_add_friend /* 2131364191 */: WidgetFriendsAdd.Companion companion = WidgetFriendsAdd.Companion; m.checkNotNullExpressionValue(context, "context"); WidgetFriendsAdd.Companion.show$default(companion, context, null, "Friends", 2, null); return; - case R.id.menu_friends_contact_sync /* 2131364190 */: + case R.id.menu_friends_contact_sync /* 2131364192 */: ContactSyncAnalytics.Companion.trackStart$default(ContactSyncAnalytics.Companion, false, g0.mapOf(o.to("location_page", "Friends List Icon")), 1, null); AnalyticsTracker.INSTANCE.openModal("Contact Sync", new Traits.Location("Friends List Icon", null, null, null, null, 30, null)); WidgetContactSync.Companion companion2 = WidgetContactSync.Companion; m.checkNotNullExpressionValue(context, "context"); WidgetContactSync.Companion.launch$default(companion2, context, null, false, false, false, 30, null); return; - case R.id.menu_friends_start_group /* 2131364191 */: + case R.id.menu_friends_start_group /* 2131364193 */: if (GroupInviteFriendsSheetFeatureFlag.Companion.getINSTANCE().isEnabled()) { GroupInviteFriendsSheet.Companion companion3 = GroupInviteFriendsSheet.Companion; FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager(); diff --git a/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventBottomButtonView$configure$$inlined$apply$lambda$1.java b/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventBottomButtonView$configure$$inlined$apply$lambda$1.java index a358482f46..937b2df605 100644 --- a/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventBottomButtonView$configure$$inlined$apply$lambda$1.java +++ b/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventBottomButtonView$configure$$inlined$apply$lambda$1.java @@ -4,16 +4,18 @@ import android.view.View; import kotlin.jvm.functions.Function0; /* compiled from: GuildScheduledEventBottomButtonView.kt */ public final class GuildScheduledEventBottomButtonView$configure$$inlined$apply$lambda$1 implements View.OnClickListener { + public final /* synthetic */ boolean $canRsvp$inlined; public final /* synthetic */ boolean $isEventActive$inlined; public final /* synthetic */ boolean $isEventComplete$inlined; public final /* synthetic */ boolean $isRsvped$inlined; public final /* synthetic */ Function0 $onRsvpButtonClicked$inlined; - public GuildScheduledEventBottomButtonView$configure$$inlined$apply$lambda$1(boolean z2, boolean z3, Function0 function0, boolean z4) { - this.$isEventActive$inlined = z2; - this.$isRsvped$inlined = z3; + public GuildScheduledEventBottomButtonView$configure$$inlined$apply$lambda$1(boolean z2, boolean z3, boolean z4, Function0 function0, boolean z5) { + this.$canRsvp$inlined = z2; + this.$isEventActive$inlined = z3; + this.$isRsvped$inlined = z4; this.$onRsvpButtonClicked$inlined = function0; - this.$isEventComplete$inlined = z4; + this.$isEventComplete$inlined = z5; } @Override // android.view.View.OnClickListener diff --git a/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventBottomButtonView.java b/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventBottomButtonView.java index e1a621b34b..981ec7e1e0 100644 --- a/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventBottomButtonView.java +++ b/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventBottomButtonView.java @@ -52,33 +52,35 @@ 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, Function0 function0, Function0 function02, Function0 function03, int i, Object obj) { - boolean z5 = false; - boolean z6 = (i & 2) != 0 ? false : z2; - boolean z7 = (i & 4) != 0 ? false : z3; - if ((i & 8) == 0) { - z5 = z4; + public static /* synthetic */ void configure$default(GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView, GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, Function0 function0, Function0 function02, Function0 function03, int i, Object obj) { + boolean z6 = false; + boolean z7 = (i & 2) != 0 ? false : z2; + boolean z8 = (i & 4) != 0 ? false : z3; + boolean z9 = (i & 8) != 0 ? false : z4; + if ((i & 16) == 0) { + z6 = z5; } - guildScheduledEventBottomButtonView.configure(guildScheduledEvent, z6, z7, z5, (i & 16) != 0 ? GuildScheduledEventBottomButtonView$configure$1.INSTANCE : function0, (i & 32) != 0 ? GuildScheduledEventBottomButtonView$configure$2.INSTANCE : function02, (i & 64) != 0 ? GuildScheduledEventBottomButtonView$configure$3.INSTANCE : function03); + guildScheduledEventBottomButtonView.configure(guildScheduledEvent, z7, z8, z9, z6, (i & 32) != 0 ? GuildScheduledEventBottomButtonView$configure$1.INSTANCE : function0, (i & 64) != 0 ? GuildScheduledEventBottomButtonView$configure$2.INSTANCE : function02, (i & 128) != 0 ? GuildScheduledEventBottomButtonView$configure$3.INSTANCE : function03); } - public final void configure(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, Function0 function0, Function0 function02, Function0 function03) { + public final void configure(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, boolean z4, boolean z5, Function0 function0, Function0 function02, Function0 function03) { m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent"); m.checkNotNullParameter(function0, "onRsvpButtonClicked"); m.checkNotNullParameter(function02, "onStartEventButtonClicked"); m.checkNotNullParameter(function03, "onShareButtonClicked"); - boolean z5 = true; int i = 0; - boolean z6 = z3 && GuildScheduledEventsSharingFeatureFlag.Companion.getINSTANCE().canShareGuildScheduledEvents(); + boolean z6 = z4 && GuildScheduledEventsSharingFeatureFlag.Companion.getINSTANCE().canShareGuildScheduledEvents(); GuildScheduledEventTiming eventTiming = GuildScheduledEventUtilitiesKt.getEventTiming(guildScheduledEvent); boolean z7 = eventTiming == GuildScheduledEventTiming.LIVE; boolean z8 = guildScheduledEvent.k() == GuildScheduledEventStatus.COMPLETED; - boolean isStartable = (z4 && guildScheduledEvent.e() != GuildScheduledEventEntityType.EXTERNAL) ? eventTiming.isStartable() : false; + boolean isStartable = (z5 && guildScheduledEvent.e() != GuildScheduledEventEntityType.EXTERNAL) ? eventTiming.isStartable() : false; ImageView imageView = this.binding.b; + imageView.setVisibility(z3 ? 0 : 8); imageView.setImageResource(z7 ? 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$configure$$inlined$apply$lambda$1(z7, z2, function0, z8)); + imageView.setOnClickListener(new GuildScheduledEventBottomButtonView$configure$$inlined$apply$lambda$1(z3, z7, z2, function0, z8)); imageView.setEnabled(!z8); TextView textView = this.binding.f1634c; + textView.setVisibility(z3 ? 0 : 8); int color = (!z2 || z7 || z8) ? z8 ? ColorCompat.getColor(textView.getContext(), (int) R.color.white_alpha_40) : ColorCompat.getColor(textView.getContext(), (int) R.color.white) : ColorCompat.getThemedColor(textView.getContext(), (int) R.attr.colorControlBrandForegroundNew); int i2 = (z7 || z8) ? 0 : z2 ? R.drawable.ic_check_brand_16dp : R.drawable.ic_bell_16dp; int i3 = z7 ? R.string.stage_channel_join_button : z8 ? R.string.guild_event_invite_completed : R.string.stage_instance_interested_label; @@ -94,10 +96,7 @@ public final class GuildScheduledEventBottomButtonView extends ConstraintLayout imageView2.setVisibility(isStartable ? 0 : 8); imageView2.setOnClickListener(new GuildScheduledEventBottomButtonView$configure$$inlined$apply$lambda$2(isStartable, function02)); ImageView imageView3 = this.binding.d; - if (!z6 || z8) { - z5 = false; - } - if (!z5) { + if (!(z6 && !z8)) { i = 8; } imageView3.setVisibility(i); diff --git a/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventItemView$configureInVoiceChannel$1.java b/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventItemView$configureInVoiceChannel$1.java new file mode 100644 index 0000000000..9603bdd0fb --- /dev/null +++ b/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventItemView$configureInVoiceChannel$1.java @@ -0,0 +1,18 @@ +package com.discord.widgets.guildscheduledevent; + +import d0.z.d.o; +import kotlin.Unit; +import kotlin.jvm.functions.Function0; +/* compiled from: GuildScheduledEventItemView.kt */ +public final class GuildScheduledEventItemView$configureInVoiceChannel$1 extends o implements Function0 { + public static final GuildScheduledEventItemView$configureInVoiceChannel$1 INSTANCE = new GuildScheduledEventItemView$configureInVoiceChannel$1(); + + public GuildScheduledEventItemView$configureInVoiceChannel$1() { + super(0); + } + + @Override // kotlin.jvm.functions.Function0 + /* renamed from: invoke */ + public final void mo1invoke() { + } +} diff --git a/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventItemView$configureInVoiceChannel$2.java b/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventItemView$configureInVoiceChannel$2.java new file mode 100644 index 0000000000..3c978e1a96 --- /dev/null +++ b/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventItemView$configureInVoiceChannel$2.java @@ -0,0 +1,18 @@ +package com.discord.widgets.guildscheduledevent; + +import d0.z.d.o; +import kotlin.Unit; +import kotlin.jvm.functions.Function0; +/* compiled from: GuildScheduledEventItemView.kt */ +public final class GuildScheduledEventItemView$configureInVoiceChannel$2 extends o implements Function0 { + public static final GuildScheduledEventItemView$configureInVoiceChannel$2 INSTANCE = new GuildScheduledEventItemView$configureInVoiceChannel$2(); + + public GuildScheduledEventItemView$configureInVoiceChannel$2() { + super(0); + } + + @Override // kotlin.jvm.functions.Function0 + /* renamed from: invoke */ + public final void mo1invoke() { + } +} diff --git a/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventItemView.java b/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventItemView.java index 902cc31fa5..0158312bed 100644 --- a/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventItemView.java +++ b/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventItemView.java @@ -1,12 +1,14 @@ package com.discord.widgets.guildscheduledevent; import android.content.Context; +import android.text.TextUtils; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.constraintlayout.widget.Barrier; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.core.content.ContextCompat; import c.a.k.b; @@ -78,17 +80,21 @@ public final class GuildScheduledEventItemView extends ConstraintLayout { i2 = R.id.guild_scheduled_event_list_item_title_text; TextView textView5 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_title_text); if (textView5 != null) { - i2 = R.id.standalone_channel_icon; - ImageView imageView = (ImageView) inflate.findViewById(R.id.standalone_channel_icon); - if (imageView != null) { - i2 = R.id.standalone_channel_name; - TextView textView6 = (TextView) inflate.findViewById(R.id.standalone_channel_name); - if (textView6 != null) { - GuildScheduledEventItemViewBinding guildScheduledEventItemViewBinding = new GuildScheduledEventItemViewBinding((ConstraintLayout) inflate, guildScheduledEventBottomButtonView, constraintLayout, guildScheduledEventDateView, linkifiedTextView, textView, simpleDraweeView, textView2, textView3, textView4, textView5, imageView, textView6); - m.checkNotNullExpressionValue(guildScheduledEventItemViewBinding, "GuildScheduledEventItemV…rom(context), this, true)"); - this.binding = guildScheduledEventItemViewBinding; - this.descriptionParser$delegate = g.lazy(new GuildScheduledEventItemView$descriptionParser$2(this)); - return; + i2 = R.id.header_barrier; + Barrier barrier = (Barrier) inflate.findViewById(R.id.header_barrier); + if (barrier != null) { + i2 = R.id.standalone_channel_icon; + ImageView imageView = (ImageView) inflate.findViewById(R.id.standalone_channel_icon); + if (imageView != null) { + i2 = R.id.standalone_channel_name; + TextView textView6 = (TextView) inflate.findViewById(R.id.standalone_channel_name); + if (textView6 != null) { + GuildScheduledEventItemViewBinding guildScheduledEventItemViewBinding = new GuildScheduledEventItemViewBinding((ConstraintLayout) inflate, guildScheduledEventBottomButtonView, constraintLayout, guildScheduledEventDateView, linkifiedTextView, textView, simpleDraweeView, textView2, textView3, textView4, textView5, barrier, imageView, textView6); + m.checkNotNullExpressionValue(guildScheduledEventItemViewBinding, "GuildScheduledEventItemV…rom(context), this, true)"); + this.binding = guildScheduledEventItemViewBinding; + this.descriptionParser$delegate = g.lazy(new GuildScheduledEventItemView$descriptionParser$2(this)); + return; + } } } } @@ -121,12 +127,12 @@ public final class GuildScheduledEventItemView extends ConstraintLayout { guildScheduledEventItemView.configureInChatList(guildScheduledEvent, channel, guild, z2, z3, (i & 32) != 0 ? GuildScheduledEventItemView$configureInChatList$1.INSTANCE : function0, (i & 64) != 0 ? GuildScheduledEventItemView$configureInChatList$2.INSTANCE : function02, function03); } - private final void configureInternal(GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, Function0 function0, Function0 function02, Function0 function03) { + private final void configureInternal(GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, Function0 function0, Function0 function02, Function0 function03) { GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView = this.binding.b; m.checkNotNullExpressionValue(guildScheduledEventBottomButtonView, "binding.guildScheduledEventListItemButtomView"); int i = 0; - guildScheduledEventBottomButtonView.setVisibility(0); - this.binding.b.configure(guildScheduledEvent, z2, z4, z3, function0, function02, function03); + guildScheduledEventBottomButtonView.setVisibility(z3 || z4 || z5 ? 0 : 8); + this.binding.b.configure(guildScheduledEvent, z2, z3, z5, z4, function0, function02, function03); TextView textView = this.binding.j; Integer l = guildScheduledEvent.l(); if (l != null) { @@ -143,16 +149,20 @@ public final class GuildScheduledEventItemView extends ConstraintLayout { configureLocation(guildScheduledEventLocationInfo, guild); } - public static /* synthetic */ void configureInternal$default(GuildScheduledEventItemView guildScheduledEventItemView, GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, Function0 function0, Function0 function02, Function0 function03, int i, Object obj) { - guildScheduledEventItemView.configureInternal(guildScheduledEvent, guildScheduledEventLocationInfo, guild, z2, z3, z4, (i & 64) != 0 ? GuildScheduledEventItemView$configureInternal$1.INSTANCE : function0, (i & 128) != 0 ? GuildScheduledEventItemView$configureInternal$2.INSTANCE : function02, (i & 256) != 0 ? GuildScheduledEventItemView$configureInternal$3.INSTANCE : function03); + public static /* synthetic */ void configureInternal$default(GuildScheduledEventItemView guildScheduledEventItemView, GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, boolean z5, Function0 function0, Function0 function02, Function0 function03, int i, Object obj) { + guildScheduledEventItemView.configureInternal(guildScheduledEvent, guildScheduledEventLocationInfo, guild, z2, z3, z4, z5, (i & 128) != 0 ? GuildScheduledEventItemView$configureInternal$1.INSTANCE : function0, (i & 256) != 0 ? GuildScheduledEventItemView$configureInternal$2.INSTANCE : function02, (i & 512) != 0 ? GuildScheduledEventItemView$configureInternal$3.INSTANCE : function03); } private final void configureLocation(GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild) { int i = 8; - if (guild != null) { + if (guildScheduledEventLocationInfo == null) { ConstraintLayout constraintLayout = this.binding.f1636c; m.checkNotNullExpressionValue(constraintLayout, "binding.guildScheduledEv…ItemChannelGuildContainer"); - constraintLayout.setVisibility(0); + constraintLayout.setVisibility(8); + } else if (guild != null) { + ConstraintLayout constraintLayout2 = this.binding.f1636c; + m.checkNotNullExpressionValue(constraintLayout2, "binding.guildScheduledEv…ItemChannelGuildContainer"); + constraintLayout2.setVisibility(0); ImageView imageView = this.binding.l; m.checkNotNullExpressionValue(imageView, "binding.standaloneChannelIcon"); imageView.setVisibility(8); @@ -186,30 +196,30 @@ public final class GuildScheduledEventItemView extends ConstraintLayout { TextView textView7 = this.binding.f; m.checkNotNullExpressionValue(textView7, "binding.guildScheduledEv…tListItemGuildChannelName"); textView7.setText(guildScheduledEventLocationInfo.getLocationName()); - return; + } else { + ConstraintLayout constraintLayout3 = this.binding.f1636c; + m.checkNotNullExpressionValue(constraintLayout3, "binding.guildScheduledEv…ItemChannelGuildContainer"); + constraintLayout3.setVisibility(0); + SimpleDraweeView simpleDraweeView3 = this.binding.g; + m.checkNotNullExpressionValue(simpleDraweeView3, "binding.guildScheduledEventListItemGuildIcon"); + simpleDraweeView3.setVisibility(8); + TextView textView8 = this.binding.h; + m.checkNotNullExpressionValue(textView8, "binding.guildScheduledEv…mGuildIconPlaceholderText"); + textView8.setVisibility(8); + TextView textView9 = this.binding.i; + m.checkNotNullExpressionValue(textView9, "binding.guildScheduledEventListItemGuildName"); + textView9.setVisibility(8); + TextView textView10 = this.binding.f; + m.checkNotNullExpressionValue(textView10, "binding.guildScheduledEv…tListItemGuildChannelName"); + textView10.setVisibility(8); + ImageView imageView2 = this.binding.l; + imageView2.setVisibility(0); + imageView2.setImageResource(guildScheduledEventLocationInfo.getLocationIcon()); + TextView textView11 = this.binding.m; + textView11.setVisibility(0); + textView11.setText(guildScheduledEventLocationInfo.getLocationName()); + m.checkNotNullExpressionValue(textView11, "binding.standaloneChanne…getLocationName()\n }"); } - ConstraintLayout constraintLayout2 = this.binding.f1636c; - m.checkNotNullExpressionValue(constraintLayout2, "binding.guildScheduledEv…ItemChannelGuildContainer"); - constraintLayout2.setVisibility(0); - SimpleDraweeView simpleDraweeView3 = this.binding.g; - m.checkNotNullExpressionValue(simpleDraweeView3, "binding.guildScheduledEventListItemGuildIcon"); - simpleDraweeView3.setVisibility(8); - TextView textView8 = this.binding.h; - m.checkNotNullExpressionValue(textView8, "binding.guildScheduledEv…mGuildIconPlaceholderText"); - textView8.setVisibility(8); - TextView textView9 = this.binding.i; - m.checkNotNullExpressionValue(textView9, "binding.guildScheduledEventListItemGuildName"); - textView9.setVisibility(8); - TextView textView10 = this.binding.f; - m.checkNotNullExpressionValue(textView10, "binding.guildScheduledEv…tListItemGuildChannelName"); - textView10.setVisibility(8); - ImageView imageView2 = this.binding.l; - imageView2.setVisibility(0); - imageView2.setImageResource(guildScheduledEventLocationInfo.getLocationIcon()); - TextView textView11 = this.binding.m; - textView11.setVisibility(0); - textView11.setText(guildScheduledEventLocationInfo.getLocationName()); - m.checkNotNullExpressionValue(textView11, "binding.standaloneChanne…getLocationName()\n }"); } public static /* synthetic */ void configureLocation$default(GuildScheduledEventItemView guildScheduledEventItemView, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, int i, Object obj) { @@ -252,7 +262,7 @@ public final class GuildScheduledEventItemView extends ConstraintLayout { m.checkNotNullParameter(function0, "rsvpButtonClickListener"); m.checkNotNullParameter(function02, "joinServerButtonClickListener"); m.checkNotNullParameter(function03, "shareButtonClickListener"); - configureInternal(guildScheduledEvent, GuildScheduledEventLocationInfo.Companion.buildLocationInfo(guildScheduledEvent, channel), guild, z3, false, true, function0, function02, function03); + configureInternal(guildScheduledEvent, GuildScheduledEventLocationInfo.Companion.buildLocationInfo(guildScheduledEvent, channel), guild, z3, true, false, true, function0, function02, function03); ConstraintLayout constraintLayout = this.binding.a; m.checkNotNullExpressionValue(constraintLayout, "binding.root"); ColorCompat colorCompat = ColorCompat.INSTANCE; @@ -289,7 +299,34 @@ public final class GuildScheduledEventItemView extends ConstraintLayout { m.checkNotNullParameter(function0, "rsvpButtonClickListener"); m.checkNotNullParameter(function02, "eventStartButtonClickListener"); m.checkNotNullParameter(function03, "shareButtonClickListener"); - configureInternal(event.getEvent(), GuildScheduledEventLocationInfo.Companion.buildLocationInfo(event.getEvent(), event.getChannel()), null, event.isRsvped(), event.getCanStartEvent(), event.getCanShare(), function0, function02, function03); + configureInternal(event.getEvent(), GuildScheduledEventLocationInfo.Companion.buildLocationInfo(event.getEvent(), event.getChannel()), null, event.isRsvped(), true, event.getCanStartEvent(), event.getCanShare(), function0, function02, function03); + } + + public final void configureInVoiceChannel(GuildScheduledEvent guildScheduledEvent, boolean z2, boolean z3, Function0 function0) { + m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent"); + m.checkNotNullParameter(function0, "onStartEventButtonClicked"); + configureInternal(guildScheduledEvent, null, null, false, false, z2, false, GuildScheduledEventItemView$configureInVoiceChannel$1.INSTANCE, function0, GuildScheduledEventItemView$configureInVoiceChannel$2.INSTANCE); + ConstraintLayout constraintLayout = this.binding.a; + m.checkNotNullExpressionValue(constraintLayout, "binding.root"); + constraintLayout.setBackgroundTintList(ColorCompat.INSTANCE.createDefaultColorStateList(ColorCompat.getThemedColor(getContext(), (int) R.attr.colorBackgroundSecondary))); + TextView textView = this.binding.j; + m.checkNotNullExpressionValue(textView, "binding.guildScheduledEventListItemRsvpText"); + int i = 8; + textView.setVisibility(8); + LinkifiedTextView linkifiedTextView = this.binding.e; + m.checkNotNullExpressionValue(linkifiedTextView, "binding.guildScheduledEventListItemDescText"); + if (!z3) { + i = 0; + } + linkifiedTextView.setVisibility(i); + TextView textView2 = this.binding.k; + if (z3) { + textView2.setMaxLines(Integer.MAX_VALUE); + textView2.setEllipsize(null); + return; + } + textView2.setMaxLines(1); + textView2.setEllipsize(TextUtils.TruncateAt.END); } public final GuildScheduledEventDescriptionParser getDescriptionParser() { diff --git a/app/src/main/java/com/discord/widgets/guildscheduledevent/WidgetGuildScheduledEventDetailsBottomSheet$Companion$enqueue$guildScheduledEventDetailsNotice$1.java b/app/src/main/java/com/discord/widgets/guildscheduledevent/WidgetGuildScheduledEventDetailsBottomSheet$Companion$enqueue$guildScheduledEventDetailsNotice$1.java index c77bab94cf..49e34d4eb6 100644 --- a/app/src/main/java/com/discord/widgets/guildscheduledevent/WidgetGuildScheduledEventDetailsBottomSheet$Companion$enqueue$guildScheduledEventDetailsNotice$1.java +++ b/app/src/main/java/com/discord/widgets/guildscheduledevent/WidgetGuildScheduledEventDetailsBottomSheet$Companion$enqueue$guildScheduledEventDetailsNotice$1.java @@ -1,8 +1,8 @@ package com.discord.widgets.guildscheduledevent; -import android.os.Bundle; import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentManager; +import com.discord.widgets.guildscheduledevent.WidgetGuildScheduledEventDetailsBottomSheet; import d0.z.d.m; import d0.z.d.o; import kotlin.jvm.functions.Function1; @@ -25,13 +25,10 @@ public final class WidgetGuildScheduledEventDetailsBottomSheet$Companion$enqueue public final boolean invoke(FragmentActivity fragmentActivity) { m.checkNotNullParameter(fragmentActivity, "appActivity"); - WidgetGuildScheduledEventDetailsBottomSheet widgetGuildScheduledEventDetailsBottomSheet = new WidgetGuildScheduledEventDetailsBottomSheet(); - Bundle bundle = new Bundle(); - bundle.putLong("com.discord.intent.extra.EXTRA_GUILD_SCHEDULED_EVENT_ID", this.$guildScheduledEventId); - widgetGuildScheduledEventDetailsBottomSheet.setArguments(bundle); + WidgetGuildScheduledEventDetailsBottomSheet.Companion companion = WidgetGuildScheduledEventDetailsBottomSheet.Companion; FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager(); m.checkNotNullExpressionValue(supportFragmentManager, "appActivity.supportFragmentManager"); - widgetGuildScheduledEventDetailsBottomSheet.show(supportFragmentManager, WidgetGuildScheduledEventDetailsBottomSheet.class.getName()); + companion.show(supportFragmentManager, this.$guildScheduledEventId); return true; } } diff --git a/app/src/main/java/com/discord/widgets/guildscheduledevent/WidgetGuildScheduledEventDetailsBottomSheet.java b/app/src/main/java/com/discord/widgets/guildscheduledevent/WidgetGuildScheduledEventDetailsBottomSheet.java index 482c0c43d9..75dbe8e3af 100644 --- a/app/src/main/java/com/discord/widgets/guildscheduledevent/WidgetGuildScheduledEventDetailsBottomSheet.java +++ b/app/src/main/java/com/discord/widgets/guildscheduledevent/WidgetGuildScheduledEventDetailsBottomSheet.java @@ -1,9 +1,11 @@ package com.discord.widgets.guildscheduledevent; import android.content.Context; +import android.os.Bundle; import android.widget.ImageView; import android.widget.TextView; import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentViewModelLazyKt; import c.a.d.f0; import c.a.d.h0; @@ -55,6 +57,15 @@ public final class WidgetGuildScheduledEventDetailsBottomSheet extends AppBottom public final void enqueue(long j) { StoreStream.Companion.getNotices().requestToShow(new StoreNotices.Notice(a.q("EVENTDETAILS-", j), null, 0, 0, false, m.listOf(a0.getOrCreateKotlinClass(WidgetHome.class)), 0, false, 0, new WidgetGuildScheduledEventDetailsBottomSheet$Companion$enqueue$guildScheduledEventDetailsNotice$1(j), FontUtils.MAX_FONT_SCALING, null)); } + + public final void show(FragmentManager fragmentManager, long j) { + d0.z.d.m.checkNotNullParameter(fragmentManager, "fragmentManager"); + WidgetGuildScheduledEventDetailsBottomSheet widgetGuildScheduledEventDetailsBottomSheet = new WidgetGuildScheduledEventDetailsBottomSheet(); + Bundle bundle = new Bundle(); + bundle.putLong("com.discord.intent.extra.EXTRA_GUILD_SCHEDULED_EVENT_ID", j); + widgetGuildScheduledEventDetailsBottomSheet.setArguments(bundle); + widgetGuildScheduledEventDetailsBottomSheet.show(fragmentManager, WidgetGuildScheduledEventDetailsBottomSheet.class.getName()); + } } public WidgetGuildScheduledEventDetailsBottomSheet() { @@ -121,7 +132,7 @@ public final class WidgetGuildScheduledEventDetailsBottomSheet extends AppBottom GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView = getBinding().b; d0.z.d.m.checkNotNullExpressionValue(guildScheduledEventBottomButtonView, "binding.guildScheduledEventDetailsButtonView"); guildScheduledEventBottomButtonView.setVisibility(0); - GuildScheduledEventBottomButtonView.configure$default(getBinding().b, initialized.getGuildScheduledEvent(), initialized.isRsvped(), false, false, new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$2(this, viewState), null, new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$3(this, viewState), 36, null); + GuildScheduledEventBottomButtonView.configure$default(getBinding().b, initialized.getGuildScheduledEvent(), initialized.isRsvped(), false, false, false, new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$2(this, viewState), null, new WidgetGuildScheduledEventDetailsBottomSheet$configureUi$3(this, viewState), 76, null); } else if (viewState instanceof GuildScheduledEventDetailsViewModel.ViewState.Invalid) { dismiss(); } diff --git a/app/src/main/java/com/discord/widgets/home/WidgetHomeHeaderManager$getOnSelectedAction$1.java b/app/src/main/java/com/discord/widgets/home/WidgetHomeHeaderManager$getOnSelectedAction$1.java index 626a146c88..615f441fca 100644 --- a/app/src/main/java/com/discord/widgets/home/WidgetHomeHeaderManager$getOnSelectedAction$1.java +++ b/app/src/main/java/com/discord/widgets/home/WidgetHomeHeaderManager$getOnSelectedAction$1.java @@ -47,25 +47,25 @@ public final class WidgetHomeHeaderManager$getOnSelectedAction$1 implements Acti m.checkNotNullExpressionValue(parentFragmentManager, "appFragment.parentFragmentManager"); PrivateCallLauncher privateCallLauncher = new PrivateCallLauncher(appFragment, appFragment, context, parentFragmentManager); switch (menuItem.getItemId()) { - case R.id.menu_chat_add_friend /* 2131364171 */: + case R.id.menu_chat_add_friend /* 2131364173 */: WidgetFriendsAdd.Companion.show$default(WidgetFriendsAdd.Companion, context, null, "Toolbar", 2, null); break; - case R.id.menu_chat_search /* 2131364172 */: + case R.id.menu_chat_search /* 2131364174 */: launchForSearch(context); break; - case R.id.menu_chat_side_panel /* 2131364173 */: + case R.id.menu_chat_side_panel /* 2131364175 */: this.$panelLayout.openEndPanel(); break; - case R.id.menu_chat_start_call /* 2131364174 */: + case R.id.menu_chat_start_call /* 2131364176 */: privateCallLauncher.launchVoiceCall(this.$this_getOnSelectedAction.getChannelId()); break; - case R.id.menu_chat_start_group /* 2131364175 */: + case R.id.menu_chat_start_group /* 2131364177 */: ChannelInviteLaunchUtils.inviteToChannel$default(ChannelInviteLaunchUtils.INSTANCE, this.$appFragment, this.$this_getOnSelectedAction.getChannel(), "Toolbar", null, null, 24, null); break; - case R.id.menu_chat_start_video_call /* 2131364176 */: + case R.id.menu_chat_start_video_call /* 2131364178 */: privateCallLauncher.launchVideoCall(this.$this_getOnSelectedAction.getChannelId()); break; - case R.id.menu_chat_stop_call /* 2131364177 */: + case R.id.menu_chat_stop_call /* 2131364179 */: StoreStream.Companion.getVoiceChannelSelected().clear(); break; } diff --git a/app/src/main/java/com/discord/widgets/media/WidgetMedia$onViewBoundOrOnResume$1.java b/app/src/main/java/com/discord/widgets/media/WidgetMedia$onViewBoundOrOnResume$1.java index e839ce0556..d55f015ac4 100644 --- a/app/src/main/java/com/discord/widgets/media/WidgetMedia$onViewBoundOrOnResume$1.java +++ b/app/src/main/java/com/discord/widgets/media/WidgetMedia$onViewBoundOrOnResume$1.java @@ -116,16 +116,16 @@ public final class WidgetMedia$onViewBoundOrOnResume$1 implements Action public final void call(MenuItem menuItem, Context context) { m.checkNotNullExpressionValue(menuItem, "menuItem"); switch (menuItem.getItemId()) { - case R.id.menu_media_browser /* 2131364194 */: + case R.id.menu_media_browser /* 2131364196 */: m.checkNotNullExpressionValue(context, "context"); String uri = this.$sourceUri.toString(); m.checkNotNullExpressionValue(uri, "sourceUri.toString()"); UriHandler.handleOrUntrusted$default(context, uri, null, 4, null); return; - case R.id.menu_media_download /* 2131364195 */: + case R.id.menu_media_download /* 2131364197 */: this.this$0.requestMediaDownload(new AnonymousClass1(this, context)); return; - case R.id.menu_media_share /* 2131364196 */: + case R.id.menu_media_share /* 2131364198 */: m.checkNotNullExpressionValue(context, "context"); String uri2 = this.$sourceUri.toString(); m.checkNotNullExpressionValue(uri2, "sourceUri.toString()"); diff --git a/app/src/main/java/com/discord/widgets/notice/WidgetNoticeDialog.java b/app/src/main/java/com/discord/widgets/notice/WidgetNoticeDialog.java index 6b7d932261..526739ed3e 100644 --- a/app/src/main/java/com/discord/widgets/notice/WidgetNoticeDialog.java +++ b/app/src/main/java/com/discord/widgets/notice/WidgetNoticeDialog.java @@ -64,11 +64,11 @@ public final class WidgetNoticeDialog extends AppDialog { private static final String ARG_THEME_ID = "theme_id"; /* renamed from: CANCEL_BUTTON */ - public static final int notice_cancel = 2131364337; + public static final int notice_cancel = 2131364339; public static final Companion Companion = new Companion(null); /* renamed from: OK_BUTTON */ - public static final int notice_ok = 2131364342; + public static final int notice_ok = 2131364344; public static final int ON_SHOW = 0; private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetNoticeDialog$binding$2.INSTANCE, null, 2, null); private Map> listenerMap; diff --git a/app/src/main/java/com/discord/widgets/servers/WidgetServerSettingsChannels$configureUI$1.java b/app/src/main/java/com/discord/widgets/servers/WidgetServerSettingsChannels$configureUI$1.java index c321b85108..e7bbd083d3 100644 --- a/app/src/main/java/com/discord/widgets/servers/WidgetServerSettingsChannels$configureUI$1.java +++ b/app/src/main/java/com/discord/widgets/servers/WidgetServerSettingsChannels$configureUI$1.java @@ -45,13 +45,13 @@ public final class WidgetServerSettingsChannels$configureUI$1 implements public final void call(MenuItem menuItem, Context context) { m.checkNotNullExpressionValue(menuItem, "menuItem"); switch (menuItem.getItemId()) { - case R.id.menu_sort_channel /* 2131364212 */: + case R.id.menu_sort_channel /* 2131364214 */: WidgetServerSettingsChannelsSortActions.Companion companion = WidgetServerSettingsChannelsSortActions.Companion; FragmentManager childFragmentManager = this.this$0.getChildFragmentManager(); m.checkNotNullExpressionValue(childFragmentManager, "childFragmentManager"); companion.show(childFragmentManager, new AnonymousClass1(this)); return; - case R.id.menu_sort_done /* 2131364213 */: + case R.id.menu_sort_done /* 2131364215 */: WidgetServerSettingsChannels.access$getChannelSortTypeSubject$p(this.this$0).onNext(-1); return; default: diff --git a/app/src/main/java/com/discord/widgets/servers/WidgetServerSettingsEditRole.java b/app/src/main/java/com/discord/widgets/servers/WidgetServerSettingsEditRole.java index dfdb6fcf49..51e0fa9750 100644 --- a/app/src/main/java/com/discord/widgets/servers/WidgetServerSettingsEditRole.java +++ b/app/src/main/java/com/discord/widgets/servers/WidgetServerSettingsEditRole.java @@ -550,132 +550,132 @@ public final class WidgetServerSettingsEditRole extends AppFragment { for (CheckedSetting checkedSetting : n.listOf((Object[]) new CheckedSetting[]{getBinding().e, getBinding().f, getBinding().g, getBinding().h, getBinding().k, getBinding().p, getBinding().f1817s, getBinding().t, getBinding().v, getBinding().f1820z, getBinding().w, getBinding().u, getBinding().f1818x, getBinding().f1819y, getBinding().A, getBinding().B, getBinding().E, getBinding().F, getBinding().K, getBinding().L, getBinding().m, getBinding().l, getBinding().M, getBinding().N, getBinding().O, getBinding().P, getBinding().d, getBinding().Q, getBinding().S, getBinding().W, getBinding().Y, getBinding().V, getBinding().T, getBinding().U, getBinding().X, getBinding().D, getBinding().R, getBinding().G})) { m.checkNotNullExpressionValue(checkedSetting, "setting"); switch (checkedSetting.getId()) { - case R.id.role_settings_add_reactions /* 2131364786 */: + case R.id.role_settings_add_reactions /* 2131364788 */: j = 64; break; - case R.id.role_settings_administrator /* 2131364787 */: + case R.id.role_settings_administrator /* 2131364789 */: j = 8; break; - case R.id.role_settings_attach_files /* 2131364788 */: + case R.id.role_settings_attach_files /* 2131364790 */: j = Permission.ATTACH_FILES; break; - case R.id.role_settings_ban_members /* 2131364789 */: + case R.id.role_settings_ban_members /* 2131364791 */: j = 4; break; - case R.id.role_settings_change_nickname /* 2131364790 */: + case R.id.role_settings_change_nickname /* 2131364792 */: j = Permission.CHANGE_NICKNAME; break; - case R.id.role_settings_color_disabled_overlay /* 2131364791 */: - case R.id.role_settings_color_selector_container /* 2131364792 */: - case R.id.role_settings_current_color_display /* 2131364796 */: - case R.id.role_settings_edit_name_disabled_overlay /* 2131364797 */: - case R.id.role_settings_hoist_checkedsetting /* 2131364799 */: - case R.id.role_settings_icon_container /* 2131364800 */: - case R.id.role_settings_mentionable_checkedsetting /* 2131364811 */: - case R.id.role_settings_overview_scroll /* 2131364812 */: - case R.id.role_settings_role_icon /* 2131364817 */: - case R.id.role_settings_role_icon_divider /* 2131364818 */: - case R.id.role_settings_role_icon_header /* 2131364819 */: + case R.id.role_settings_color_disabled_overlay /* 2131364793 */: + case R.id.role_settings_color_selector_container /* 2131364794 */: + case R.id.role_settings_current_color_display /* 2131364798 */: + case R.id.role_settings_edit_name_disabled_overlay /* 2131364799 */: + case R.id.role_settings_hoist_checkedsetting /* 2131364801 */: + case R.id.role_settings_icon_container /* 2131364802 */: + case R.id.role_settings_mentionable_checkedsetting /* 2131364813 */: + case R.id.role_settings_overview_scroll /* 2131364814 */: + case R.id.role_settings_role_icon /* 2131364819 */: + case R.id.role_settings_role_icon_divider /* 2131364820 */: + case R.id.role_settings_role_icon_header /* 2131364821 */: default: j = 0; break; - case R.id.role_settings_create_instant_invite /* 2131364793 */: + case R.id.role_settings_create_instant_invite /* 2131364795 */: j = 1; break; - case R.id.role_settings_create_private_threads /* 2131364794 */: + case R.id.role_settings_create_private_threads /* 2131364796 */: j = Permission.CREATE_PRIVATE_THREADS; break; - case R.id.role_settings_create_public_threads /* 2131364795 */: + case R.id.role_settings_create_public_threads /* 2131364797 */: j = Permission.CREATE_PUBLIC_THREADS; break; - case R.id.role_settings_embed_links /* 2131364798 */: + case R.id.role_settings_embed_links /* 2131364800 */: j = Permission.EMBED_LINKS; break; - case R.id.role_settings_kick_members /* 2131364801 */: + case R.id.role_settings_kick_members /* 2131364803 */: j = 2; break; - case R.id.role_settings_manage_channels /* 2131364802 */: + case R.id.role_settings_manage_channels /* 2131364804 */: j = 16; break; - case R.id.role_settings_manage_emojis_and_stickers /* 2131364803 */: + case R.id.role_settings_manage_emojis_and_stickers /* 2131364805 */: j = Permission.MANAGE_EMOJIS_AND_STICKERS; break; - case R.id.role_settings_manage_messages /* 2131364804 */: + case R.id.role_settings_manage_messages /* 2131364806 */: j = Permission.MANAGE_MESSAGES; break; - case R.id.role_settings_manage_nicknames /* 2131364805 */: + case R.id.role_settings_manage_nicknames /* 2131364807 */: j = Permission.MANAGE_NICKNAMES; break; - case R.id.role_settings_manage_roles /* 2131364806 */: + case R.id.role_settings_manage_roles /* 2131364808 */: j = Permission.MANAGE_ROLES; break; - case R.id.role_settings_manage_server /* 2131364807 */: + case R.id.role_settings_manage_server /* 2131364809 */: j = 32; break; - case R.id.role_settings_manage_threads /* 2131364808 */: + case R.id.role_settings_manage_threads /* 2131364810 */: j = Permission.MANAGE_THREADS; break; - case R.id.role_settings_manage_webhooks /* 2131364809 */: + case R.id.role_settings_manage_webhooks /* 2131364811 */: j = Permission.MANAGE_WEBHOOKS; break; - case R.id.role_settings_mention_everyone /* 2131364810 */: + case R.id.role_settings_mention_everyone /* 2131364812 */: j = Permission.MENTION_EVERYONE; break; - case R.id.role_settings_priority_speaker /* 2131364813 */: + case R.id.role_settings_priority_speaker /* 2131364815 */: j = 256; break; - case R.id.role_settings_read_message_history /* 2131364814 */: + case R.id.role_settings_read_message_history /* 2131364816 */: j = Permission.READ_MESSAGE_HISTORY; break; - case R.id.role_settings_read_messages /* 2131364815 */: + case R.id.role_settings_read_messages /* 2131364817 */: j = Permission.VIEW_CHANNEL; break; - case R.id.role_settings_request_to_speak /* 2131364816 */: + case R.id.role_settings_request_to_speak /* 2131364818 */: j = Permission.REQUEST_TO_SPEAK; break; - case R.id.role_settings_send_messages /* 2131364820 */: + case R.id.role_settings_send_messages /* 2131364822 */: j = Permission.SEND_MESSAGES; break; - case R.id.role_settings_send_messages_in_threads /* 2131364821 */: + case R.id.role_settings_send_messages_in_threads /* 2131364823 */: j = Permission.SEND_MESSAGES_IN_THREADS; break; - case R.id.role_settings_send_tts_messages /* 2131364822 */: + case R.id.role_settings_send_tts_messages /* 2131364824 */: j = Permission.SEND_TTS_MESSAGES; break; - case R.id.role_settings_use_application_commands /* 2131364823 */: + case R.id.role_settings_use_application_commands /* 2131364825 */: j = Permission.USE_APPLICATION_COMMANDS; break; - case R.id.role_settings_use_external_emojis /* 2131364824 */: + case R.id.role_settings_use_external_emojis /* 2131364826 */: j = Permission.USE_EXTERNAL_EMOJIS; break; - case R.id.role_settings_use_external_stickers /* 2131364825 */: + case R.id.role_settings_use_external_stickers /* 2131364827 */: j = Permission.USE_EXTERNAL_STICKERS; break; - case R.id.role_settings_view_audit_log /* 2131364826 */: + case R.id.role_settings_view_audit_log /* 2131364828 */: j = 128; break; - case R.id.role_settings_view_guild_analytics /* 2131364827 */: + case R.id.role_settings_view_guild_analytics /* 2131364829 */: j = Permission.VIEW_GUILD_ANALYTICS; break; - case R.id.role_settings_voice_connect /* 2131364828 */: + case R.id.role_settings_voice_connect /* 2131364830 */: j = Permission.CONNECT; break; - case R.id.role_settings_voice_deafen_members /* 2131364829 */: + case R.id.role_settings_voice_deafen_members /* 2131364831 */: j = Permission.DEAFEN_MEMBERS; break; - case R.id.role_settings_voice_move_members /* 2131364830 */: + case R.id.role_settings_voice_move_members /* 2131364832 */: j = Permission.MOVE_MEMBERS; break; - case R.id.role_settings_voice_mute_members /* 2131364831 */: + case R.id.role_settings_voice_mute_members /* 2131364833 */: j = Permission.MUTE_MEMBERS; break; - case R.id.role_settings_voice_speak /* 2131364832 */: + case R.id.role_settings_voice_speak /* 2131364834 */: j = Permission.SPEAK; break; - case R.id.role_settings_voice_use_voice_activity /* 2131364833 */: + case R.id.role_settings_voice_use_voice_activity /* 2131364835 */: j = Permission.USE_VAD; break; - case R.id.role_settings_voice_video /* 2131364834 */: + case R.id.role_settings_voice_video /* 2131364836 */: j = 512; break; } diff --git a/app/src/main/java/com/discord/widgets/servers/auditlog/WidgetServerSettingsAuditLog$onViewBound$1.java b/app/src/main/java/com/discord/widgets/servers/auditlog/WidgetServerSettingsAuditLog$onViewBound$1.java index c9fce51bea..5d121c5c8e 100644 --- a/app/src/main/java/com/discord/widgets/servers/auditlog/WidgetServerSettingsAuditLog$onViewBound$1.java +++ b/app/src/main/java/com/discord/widgets/servers/auditlog/WidgetServerSettingsAuditLog$onViewBound$1.java @@ -33,10 +33,10 @@ public final class WidgetServerSettingsAuditLog$onViewBound$1 implements Acti public final boolean onMenuItemClick(MenuItem menuItem) { m.checkNotNullExpressionValue(menuItem, "it"); switch (menuItem.getItemId()) { - case R.id.menu_audit_log_sort_actions /* 2131364161 */: + case R.id.menu_audit_log_sort_actions /* 2131364163 */: WidgetServerSettingsAuditLogFilter.Companion.show(a.x(this.$view, "view", "view.context"), WidgetServerSettingsAuditLog.access$getGuildId$p(this.this$0.this$0.this$0), 1); break; - case R.id.menu_audit_log_sort_users /* 2131364162 */: + case R.id.menu_audit_log_sort_users /* 2131364164 */: WidgetServerSettingsAuditLogFilter.Companion.show(a.x(this.$view, "view", "view.context"), WidgetServerSettingsAuditLog.access$getGuildId$p(this.this$0.this$0.this$0), 0); break; } diff --git a/app/src/main/java/com/discord/widgets/settings/WidgetSettings$configureToolbar$1.java b/app/src/main/java/com/discord/widgets/settings/WidgetSettings$configureToolbar$1.java index e054214f51..4d4c59f366 100644 --- a/app/src/main/java/com/discord/widgets/settings/WidgetSettings$configureToolbar$1.java +++ b/app/src/main/java/com/discord/widgets/settings/WidgetSettings$configureToolbar$1.java @@ -17,12 +17,12 @@ public final class WidgetSettings$configureToolbar$1 implements Action2< public final void call(MenuItem menuItem, Context context) { m.checkNotNullExpressionValue(menuItem, "menuItem"); switch (menuItem.getItemId()) { - case R.id.menu_settings_debugging /* 2131364207 */: + case R.id.menu_settings_debugging /* 2131364209 */: WidgetDebugging.Companion companion = WidgetDebugging.Companion; m.checkNotNullExpressionValue(context, "context"); companion.launch(context); return; - case R.id.menu_settings_log_out /* 2131364208 */: + case R.id.menu_settings_log_out /* 2131364210 */: WidgetSettings widgetSettings = this.this$0; m.checkNotNullExpressionValue(context, "context"); WidgetSettings.access$showLogoutDialog(widgetSettings, context); diff --git a/app/src/main/java/com/discord/widgets/settings/WidgetSettings.java b/app/src/main/java/com/discord/widgets/settings/WidgetSettings.java index 98c4e712f1..a427400bb2 100644 --- a/app/src/main/java/com/discord/widgets/settings/WidgetSettings.java +++ b/app/src/main/java/com/discord/widgets/settings/WidgetSettings.java @@ -323,7 +323,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 + " - 92.1 - Alpha (92201)"); + textView.setText(string + " - 92.2 - Alpha (92202)"); binding.B.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); diff --git a/app/src/main/java/com/discord/widgets/voice/fullscreen/WidgetCallFullscreen$configureMenu$1.java b/app/src/main/java/com/discord/widgets/voice/fullscreen/WidgetCallFullscreen$configureMenu$1.java index a45bc83124..b0dc1de080 100644 --- a/app/src/main/java/com/discord/widgets/voice/fullscreen/WidgetCallFullscreen$configureMenu$1.java +++ b/app/src/main/java/com/discord/widgets/voice/fullscreen/WidgetCallFullscreen$configureMenu$1.java @@ -52,21 +52,21 @@ public final class WidgetCallFullscreen$configureMenu$1 implements Actio public final void call(MenuItem menuItem, Context context) { m.checkNotNullExpressionValue(menuItem, "menuItem"); switch (menuItem.getItemId()) { - case R.id.menu_call_overlay_launcher /* 2131364165 */: + case R.id.menu_call_overlay_launcher /* 2131364167 */: DiscordOverlayService.Companion companion = DiscordOverlayService.Companion; m.checkNotNullExpressionValue(context, "context"); companion.launchForConnect(context); return; - case R.id.menu_call_switch_camera /* 2131364166 */: + case R.id.menu_call_switch_camera /* 2131364168 */: WidgetCallFullscreen.access$getViewModel$p(this.this$0).switchCameraInputPressed(); return; - case R.id.menu_call_video_list /* 2131364167 */: + case R.id.menu_call_video_list /* 2131364169 */: WidgetVoiceBottomSheet.Companion companion2 = WidgetVoiceBottomSheet.Companion; FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager(); m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager"); companion2.show(parentFragmentManager, this.$viewState.getCallModel().getChannel().h(), false, WidgetVoiceBottomSheet.FeatureContext.FULLSCREEN_CALL).setOnStreamPreviewClickedListener(new AnonymousClass1(this)); return; - case R.id.menu_call_voice_settings /* 2131364168 */: + case R.id.menu_call_voice_settings /* 2131364170 */: WidgetVoiceSettingsBottomSheet.Companion companion3 = WidgetVoiceSettingsBottomSheet.Companion; Long valueOf = Long.valueOf(this.$viewState.getCallModel().getChannel().h()); FragmentManager parentFragmentManager2 = this.this$0.getParentFragmentManager(); diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$ViewHolderEvent$onConfigure$1.java b/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$ViewHolderEvent$onConfigure$1.java new file mode 100644 index 0000000000..70fafe89fe --- /dev/null +++ b/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$ViewHolderEvent$onConfigure$1.java @@ -0,0 +1,25 @@ +package com.discord.widgets.voice.sheet; + +import com.discord.utilities.mg_recycler.MGRecyclerDataPayload; +import com.discord.widgets.voice.sheet.CallParticipantsAdapter; +import d0.z.d.o; +import kotlin.Unit; +import kotlin.jvm.functions.Function0; +/* compiled from: CallParticipantsAdapter.kt */ +public final class CallParticipantsAdapter$ViewHolderEvent$onConfigure$1 extends o implements Function0 { + public final /* synthetic */ MGRecyclerDataPayload $data; + public final /* synthetic */ CallParticipantsAdapter.ViewHolderEvent this$0; + + /* JADX INFO: super call moved to the top of the method (can break code semantics) */ + public CallParticipantsAdapter$ViewHolderEvent$onConfigure$1(CallParticipantsAdapter.ViewHolderEvent viewHolderEvent, MGRecyclerDataPayload mGRecyclerDataPayload) { + super(0); + this.this$0 = viewHolderEvent; + this.$data = mGRecyclerDataPayload; + } + + @Override // kotlin.jvm.functions.Function0 + /* renamed from: invoke */ + public final void mo1invoke() { + CallParticipantsAdapter.ViewHolderEvent.access$getAdapter$p(this.this$0).getOnStartEventClicked().invoke(((CallParticipantsAdapter.ListItem.Event) this.$data).getEvent()); + } +} diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$ViewHolderEvent$onConfigure$2.java b/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$ViewHolderEvent$onConfigure$2.java new file mode 100644 index 0000000000..8028ad2bcf --- /dev/null +++ b/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$ViewHolderEvent$onConfigure$2.java @@ -0,0 +1,20 @@ +package com.discord.widgets.voice.sheet; + +import android.view.View; +import com.discord.utilities.mg_recycler.MGRecyclerDataPayload; +import com.discord.widgets.voice.sheet.CallParticipantsAdapter; +/* compiled from: CallParticipantsAdapter.kt */ +public final class CallParticipantsAdapter$ViewHolderEvent$onConfigure$2 implements View.OnClickListener { + public final /* synthetic */ MGRecyclerDataPayload $data; + public final /* synthetic */ CallParticipantsAdapter.ViewHolderEvent this$0; + + public CallParticipantsAdapter$ViewHolderEvent$onConfigure$2(CallParticipantsAdapter.ViewHolderEvent viewHolderEvent, MGRecyclerDataPayload mGRecyclerDataPayload) { + this.this$0 = viewHolderEvent; + this.$data = mGRecyclerDataPayload; + } + + @Override // android.view.View.OnClickListener + public final void onClick(View view) { + CallParticipantsAdapter.ViewHolderEvent.access$getAdapter$p(this.this$0).getOnEventClicked().invoke(((CallParticipantsAdapter.ListItem.Event) this.$data).getEvent()); + } +} diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$onEventClicked$1.java b/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$onEventClicked$1.java new file mode 100644 index 0000000000..669d4fd5cf --- /dev/null +++ b/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$onEventClicked$1.java @@ -0,0 +1,27 @@ +package com.discord.widgets.voice.sheet; + +import com.discord.api.guildscheduledevent.GuildScheduledEvent; +import d0.z.d.m; +import d0.z.d.o; +import kotlin.Unit; +import kotlin.jvm.functions.Function1; +/* compiled from: CallParticipantsAdapter.kt */ +public final class CallParticipantsAdapter$onEventClicked$1 extends o implements Function1 { + public static final CallParticipantsAdapter$onEventClicked$1 INSTANCE = new CallParticipantsAdapter$onEventClicked$1(); + + public CallParticipantsAdapter$onEventClicked$1() { + super(1); + } + + /* 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] */ + @Override // kotlin.jvm.functions.Function1 + public /* bridge */ /* synthetic */ Unit invoke(GuildScheduledEvent guildScheduledEvent) { + invoke(guildScheduledEvent); + return Unit.a; + } + + public final void invoke(GuildScheduledEvent guildScheduledEvent) { + m.checkNotNullParameter(guildScheduledEvent, "it"); + } +} diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$onStartEventClicked$1.java b/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$onStartEventClicked$1.java new file mode 100644 index 0000000000..8c4c2ee2eb --- /dev/null +++ b/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter$onStartEventClicked$1.java @@ -0,0 +1,27 @@ +package com.discord.widgets.voice.sheet; + +import com.discord.api.guildscheduledevent.GuildScheduledEvent; +import d0.z.d.m; +import d0.z.d.o; +import kotlin.Unit; +import kotlin.jvm.functions.Function1; +/* compiled from: CallParticipantsAdapter.kt */ +public final class CallParticipantsAdapter$onStartEventClicked$1 extends o implements Function1 { + public static final CallParticipantsAdapter$onStartEventClicked$1 INSTANCE = new CallParticipantsAdapter$onStartEventClicked$1(); + + public CallParticipantsAdapter$onStartEventClicked$1() { + super(1); + } + + /* 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] */ + @Override // kotlin.jvm.functions.Function1 + public /* bridge */ /* synthetic */ Unit invoke(GuildScheduledEvent guildScheduledEvent) { + invoke(guildScheduledEvent); + return Unit.a; + } + + public final void invoke(GuildScheduledEvent guildScheduledEvent) { + m.checkNotNullParameter(guildScheduledEvent, "it"); + } +} diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter.java b/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter.java index c53f7bc6f9..01e017f8f7 100644 --- a/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter.java +++ b/app/src/main/java/com/discord/widgets/voice/sheet/CallParticipantsAdapter.java @@ -2,6 +2,7 @@ package com.discord.widgets.voice.sheet; import android.view.View; import android.view.ViewGroup; +import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; @@ -10,7 +11,9 @@ import androidx.recyclerview.widget.RecyclerView; import c.a.k.b; import c.d.b.a.a; import com.discord.R; +import com.discord.api.guildscheduledevent.GuildScheduledEvent; import com.discord.api.voice.state.VoiceState; +import com.discord.databinding.VoiceUserListItemEventBinding; import com.discord.databinding.VoiceUserListItemHeaderBinding; import com.discord.databinding.VoiceUserListItemUserBinding; import com.discord.stores.StoreApplicationStreamPreviews; @@ -22,6 +25,7 @@ import com.discord.utilities.mg_recycler.MGRecyclerViewHolder; import com.discord.utilities.streams.StreamContext; import com.discord.views.StreamPreviewView; import com.discord.views.VoiceUserView; +import com.discord.widgets.guildscheduledevent.GuildScheduledEventItemView; import com.google.android.material.button.MaterialButton; import d0.z.d.m; import java.util.Objects; @@ -32,11 +36,14 @@ import kotlin.jvm.internal.DefaultConstructorMarker; public final class CallParticipantsAdapter extends MGRecyclerAdapterSimple { public static final Companion Companion = new Companion(null); private static final int VIEW_TYPE_DIVIDER = 3; + private static final int VIEW_TYPE_EVENT = 5; private static final int VIEW_TYPE_HEADER = 1; private static final int VIEW_TYPE_INVITE = 4; private static final int VIEW_TYPE_SPECTATORS_HEADER = 2; private static final int VIEW_TYPE_VOICE_USER = 0; + private Function1 onEventClicked; private Function1 onInviteFriendsClicked; + private Function1 onStartEventClicked; private Function1 onStreamPreviewClicked; private Function1 onToggleRingingClicked; private Function1 onVoiceUserClicked; @@ -76,6 +83,115 @@ public final class CallParticipantsAdapter extends MGRecyclerAdapterSimple { + private final VoiceUserListItemEventBinding binding; + + /* JADX INFO: super call moved to the top of the method (can break code semantics) */ + public ViewHolderEvent(CallParticipantsAdapter callParticipantsAdapter) { + super((int) R.layout.voice_user_list_item_event, callParticipantsAdapter); + m.checkNotNullParameter(callParticipantsAdapter, "adapter"); + View view = this.itemView; + GuildScheduledEventItemView guildScheduledEventItemView = (GuildScheduledEventItemView) view.findViewById(R.id.event_card); + if (guildScheduledEventItemView != null) { + VoiceUserListItemEventBinding voiceUserListItemEventBinding = new VoiceUserListItemEventBinding((FrameLayout) view, guildScheduledEventItemView); + m.checkNotNullExpressionValue(voiceUserListItemEventBinding, "VoiceUserListItemEventBinding.bind(itemView)"); + this.binding = voiceUserListItemEventBinding; + return; + } + throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(R.id.event_card))); + } + + public static final /* synthetic */ CallParticipantsAdapter access$getAdapter$p(ViewHolderEvent viewHolderEvent) { + return (CallParticipantsAdapter) viewHolderEvent.adapter; + } + + public void onConfigure(int i, MGRecyclerDataPayload mGRecyclerDataPayload) { + m.checkNotNullParameter(mGRecyclerDataPayload, "data"); + super.onConfigure(i, (int) mGRecyclerDataPayload); + if (mGRecyclerDataPayload instanceof ListItem.Event) { + ListItem.Event event = (ListItem.Event) mGRecyclerDataPayload; + this.binding.b.configureInVoiceChannel(event.getEvent(), event.getCanStartEvent() && event.isCurrentUserInCall(), event.isCurrentUserInCall(), new CallParticipantsAdapter$ViewHolderEvent$onConfigure$1(this, mGRecyclerDataPayload)); + this.binding.b.setOnClickListener(new CallParticipantsAdapter$ViewHolderEvent$onConfigure$2(this, mGRecyclerDataPayload)); + } + } + } + /* compiled from: CallParticipantsAdapter.kt */ public static final class ViewHolderHeader extends MGRecyclerViewHolder { private final VoiceUserListItemHeaderBinding binding; @@ -575,6 +725,8 @@ public final class CallParticipantsAdapter extends MGRecyclerAdapterSimple, kotlin.jvm.functions.Function1 */ + public final Function1 getOnEventClicked() { + return this.onEventClicked; + } + /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1 */ public final Function1 getOnInviteFriendsClicked() { return this.onInviteFriendsClicked; } + /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1 */ + public final Function1 getOnStartEventClicked() { + return this.onStartEventClicked; + } + /* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1 */ public final Function1 getOnStreamPreviewClicked() { return this.onStreamPreviewClicked; @@ -620,14 +782,27 @@ public final class CallParticipantsAdapter extends MGRecyclerAdapterSimple function1) { + m.checkNotNullParameter(function1, ""); + this.onEventClicked = function1; + } + public final void setOnInviteFriendsClicked(Function1 function1) { m.checkNotNullParameter(function1, ""); this.onInviteFriendsClicked = function1; } + public final void setOnStartEventClicked(Function1 function1) { + m.checkNotNullParameter(function1, ""); + this.onStartEventClicked = function1; + } + public final void setOnStreamPreviewClicked(Function1 function1) { m.checkNotNullParameter(function1, ""); this.onStreamPreviewClicked = function1; diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$1.java b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$1.java index 1c0eee1731..087d8e06ae 100644 --- a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$1.java +++ b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$1.java @@ -1,12 +1,14 @@ package com.discord.widgets.voice.sheet; -import com.discord.widgets.voice.sheet.WidgetVoiceBottomSheetViewModel; +import androidx.fragment.app.FragmentManager; +import com.discord.api.guildscheduledevent.GuildScheduledEvent; +import com.discord.widgets.guildscheduledevent.WidgetGuildScheduledEventDetailsBottomSheet; import d0.z.d.m; import d0.z.d.o; import kotlin.Unit; import kotlin.jvm.functions.Function1; /* compiled from: WidgetVoiceBottomSheet.kt */ -public final class WidgetVoiceBottomSheet$onResume$1 extends o implements Function1 { +public final class WidgetVoiceBottomSheet$onResume$1 extends o implements Function1 { public final /* synthetic */ WidgetVoiceBottomSheet this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ @@ -18,13 +20,16 @@ public final class WidgetVoiceBottomSheet$onResume$1 extends o implements Functi /* 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] */ @Override // kotlin.jvm.functions.Function1 - public /* bridge */ /* synthetic */ Unit invoke(WidgetVoiceBottomSheetViewModel.ViewState viewState) { - invoke(viewState); + public /* bridge */ /* synthetic */ Unit invoke(GuildScheduledEvent guildScheduledEvent) { + invoke(guildScheduledEvent); return Unit.a; } - public final void invoke(WidgetVoiceBottomSheetViewModel.ViewState viewState) { - m.checkNotNullParameter(viewState, "viewState"); - WidgetVoiceBottomSheet.access$configureUI(this.this$0, viewState); + public final void invoke(GuildScheduledEvent guildScheduledEvent) { + m.checkNotNullParameter(guildScheduledEvent, "event"); + WidgetGuildScheduledEventDetailsBottomSheet.Companion companion = WidgetGuildScheduledEventDetailsBottomSheet.Companion; + FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager(); + m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager"); + companion.show(parentFragmentManager, guildScheduledEvent.g()); } } diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$2.java b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$2.java index 7d9dde13f7..1c8e752c81 100644 --- a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$2.java +++ b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$2.java @@ -1,26 +1,42 @@ package com.discord.widgets.voice.sheet; -import com.discord.widgets.voice.sheet.WidgetVoiceBottomSheetViewModel; -import d0.z.d.k; +import android.content.Context; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import com.discord.api.guildscheduledevent.GuildScheduledEvent; +import com.discord.databinding.WidgetVoiceBottomSheetBinding; +import com.discord.widgets.guildscheduledevent.GuildScheduledEventModelKt; +import com.discord.widgets.guildscheduledevent.WidgetPreviewGuildScheduledEvent; import d0.z.d.m; +import d0.z.d.o; import kotlin.Unit; import kotlin.jvm.functions.Function1; /* compiled from: WidgetVoiceBottomSheet.kt */ -public final /* synthetic */ class WidgetVoiceBottomSheet$onResume$2 extends k implements Function1 { +public final class WidgetVoiceBottomSheet$onResume$2 extends o implements Function1 { + public final /* synthetic */ WidgetVoiceBottomSheet this$0; + + /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public WidgetVoiceBottomSheet$onResume$2(WidgetVoiceBottomSheet widgetVoiceBottomSheet) { - super(1, widgetVoiceBottomSheet, WidgetVoiceBottomSheet.class, "handleEvent", "handleEvent(Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event;)V", 0); + super(1); + this.this$0 = widgetVoiceBottomSheet; } /* 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] */ @Override // kotlin.jvm.functions.Function1 - public /* bridge */ /* synthetic */ Unit invoke(WidgetVoiceBottomSheetViewModel.Event event) { - invoke(event); + public /* bridge */ /* synthetic */ Unit invoke(GuildScheduledEvent guildScheduledEvent) { + invoke(guildScheduledEvent); return Unit.a; } - public final void invoke(WidgetVoiceBottomSheetViewModel.Event event) { - m.checkNotNullParameter(event, "p1"); - WidgetVoiceBottomSheet.access$handleEvent((WidgetVoiceBottomSheet) this.receiver, event); + public final void invoke(GuildScheduledEvent guildScheduledEvent) { + m.checkNotNullParameter(guildScheduledEvent, "event"); + WidgetPreviewGuildScheduledEvent.Companion companion = WidgetPreviewGuildScheduledEvent.Companion; + WidgetVoiceBottomSheetBinding access$getBinding$p = WidgetVoiceBottomSheet.access$getBinding$p(this.this$0); + m.checkNotNullExpressionValue(access$getBinding$p, "binding"); + CoordinatorLayout coordinatorLayout = access$getBinding$p.a; + m.checkNotNullExpressionValue(coordinatorLayout, "binding.root"); + Context context = coordinatorLayout.getContext(); + m.checkNotNullExpressionValue(context, "binding.root.context"); + WidgetPreviewGuildScheduledEvent.Companion.launch$default(companion, context, GuildScheduledEventModelKt.toModel(guildScheduledEvent), Long.valueOf(guildScheduledEvent.g()), null, 8, null); } } diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$3.java b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$3.java index 82399432c5..1ffa5c8349 100644 --- a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$3.java +++ b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$3.java @@ -1,13 +1,12 @@ package com.discord.widgets.voice.sheet; -import com.discord.utilities.analytics.Traits; +import com.discord.widgets.voice.sheet.WidgetVoiceBottomSheetViewModel; import d0.z.d.m; import d0.z.d.o; import kotlin.Unit; import kotlin.jvm.functions.Function1; -import rx.Subscription; /* compiled from: WidgetVoiceBottomSheet.kt */ -public final class WidgetVoiceBottomSheet$onResume$3 extends o implements Function1 { +public final class WidgetVoiceBottomSheet$onResume$3 extends o implements Function1 { public final /* synthetic */ WidgetVoiceBottomSheet this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ @@ -19,13 +18,13 @@ public final class WidgetVoiceBottomSheet$onResume$3 extends o implements Functi /* 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] */ @Override // kotlin.jvm.functions.Function1 - public /* bridge */ /* synthetic */ Unit invoke(Subscription subscription) { - invoke(subscription); + public /* bridge */ /* synthetic */ Unit invoke(WidgetVoiceBottomSheetViewModel.ViewState viewState) { + invoke(viewState); return Unit.a; } - public final void invoke(Subscription subscription) { - m.checkNotNullParameter(subscription, Traits.Payment.Type.SUBSCRIPTION); - WidgetVoiceBottomSheet.access$setViewModelEventSubscription$p(this.this$0, subscription); + public final void invoke(WidgetVoiceBottomSheetViewModel.ViewState viewState) { + m.checkNotNullParameter(viewState, "viewState"); + WidgetVoiceBottomSheet.access$configureUI(this.this$0, viewState); } } diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$4.java b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$4.java new file mode 100644 index 0000000000..ca46942963 --- /dev/null +++ b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$4.java @@ -0,0 +1,26 @@ +package com.discord.widgets.voice.sheet; + +import com.discord.widgets.voice.sheet.WidgetVoiceBottomSheetViewModel; +import d0.z.d.k; +import d0.z.d.m; +import kotlin.Unit; +import kotlin.jvm.functions.Function1; +/* compiled from: WidgetVoiceBottomSheet.kt */ +public final /* synthetic */ class WidgetVoiceBottomSheet$onResume$4 extends k implements Function1 { + public WidgetVoiceBottomSheet$onResume$4(WidgetVoiceBottomSheet widgetVoiceBottomSheet) { + super(1, widgetVoiceBottomSheet, WidgetVoiceBottomSheet.class, "handleEvent", "handleEvent(Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event;)V", 0); + } + + /* 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] */ + @Override // kotlin.jvm.functions.Function1 + public /* bridge */ /* synthetic */ Unit invoke(WidgetVoiceBottomSheetViewModel.Event event) { + invoke(event); + return Unit.a; + } + + public final void invoke(WidgetVoiceBottomSheetViewModel.Event event) { + m.checkNotNullParameter(event, "p1"); + WidgetVoiceBottomSheet.access$handleEvent((WidgetVoiceBottomSheet) this.receiver, event); + } +} diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$5.java b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$5.java new file mode 100644 index 0000000000..08ab707408 --- /dev/null +++ b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$onResume$5.java @@ -0,0 +1,31 @@ +package com.discord.widgets.voice.sheet; + +import com.discord.utilities.analytics.Traits; +import d0.z.d.m; +import d0.z.d.o; +import kotlin.Unit; +import kotlin.jvm.functions.Function1; +import rx.Subscription; +/* compiled from: WidgetVoiceBottomSheet.kt */ +public final class WidgetVoiceBottomSheet$onResume$5 extends o implements Function1 { + public final /* synthetic */ WidgetVoiceBottomSheet this$0; + + /* JADX INFO: super call moved to the top of the method (can break code semantics) */ + public WidgetVoiceBottomSheet$onResume$5(WidgetVoiceBottomSheet widgetVoiceBottomSheet) { + super(1); + this.this$0 = widgetVoiceBottomSheet; + } + + /* 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] */ + @Override // kotlin.jvm.functions.Function1 + public /* bridge */ /* synthetic */ Unit invoke(Subscription subscription) { + invoke(subscription); + return Unit.a; + } + + public final void invoke(Subscription subscription) { + m.checkNotNullParameter(subscription, Traits.Payment.Type.SUBSCRIPTION); + WidgetVoiceBottomSheet.access$setViewModelEventSubscription$p(this.this$0, subscription); + } +} diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet.java b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet.java index 1a3cfd2fab..5ad0aa3df6 100644 --- a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet.java +++ b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheet.java @@ -45,7 +45,6 @@ import com.discord.widgets.voice.sheet.WidgetVoiceBottomSheetViewModel; import com.discord.widgets.voice.stream.StreamNavigator; import com.google.android.material.button.MaterialButton; import d0.g; -import d0.t.n; import d0.z.d.a0; import d0.z.d.m; import java.util.List; @@ -299,10 +298,56 @@ public final class WidgetVoiceBottomSheet extends AppBottomSheet { /* compiled from: WidgetVoiceBottomSheet.kt */ public static final class Empty extends CenterContent { - public static final Empty INSTANCE = new Empty(); + private final List items; - private Empty() { + /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: java.util.List */ + /* JADX WARN: Multi-variable type inference failed */ + /* JADX INFO: super call moved to the top of the method (can break code semantics) */ + public Empty(List list) { super(null); + m.checkNotNullParameter(list, "items"); + this.items = list; + } + + /* JADX DEBUG: Multi-variable search result rejected for r0v0, resolved type: com.discord.widgets.voice.sheet.WidgetVoiceBottomSheet$CenterContent$Empty */ + /* JADX WARN: Multi-variable type inference failed */ + public static /* synthetic */ Empty copy$default(Empty empty, List list, int i, Object obj) { + if ((i & 1) != 0) { + list = empty.items; + } + return empty.copy(list); + } + + public final List component1() { + return this.items; + } + + public final Empty copy(List list) { + m.checkNotNullParameter(list, "items"); + return new Empty(list); + } + + public boolean equals(Object obj) { + if (this != obj) { + return (obj instanceof Empty) && m.areEqual(this.items, ((Empty) obj).items); + } + return true; + } + + public final List getItems() { + return this.items; + } + + public int hashCode() { + List list = this.items; + if (list != null) { + return list.hashCode(); + } + return 0; + } + + public String toString() { + return a.J(a.P("Empty(items="), this.items, ")"); } } @@ -446,6 +491,10 @@ public final class WidgetVoiceBottomSheet extends AppBottomSheet { return widgetVoiceBottomSheet.getArgumentsOrDefault(); } + public static final /* synthetic */ WidgetVoiceBottomSheetBinding access$getBinding$p(WidgetVoiceBottomSheet widgetVoiceBottomSheet) { + return widgetVoiceBottomSheet.getBinding(); + } + public static final /* synthetic */ long access$getChannelId$p(WidgetVoiceBottomSheet widgetVoiceBottomSheet) { return widgetVoiceBottomSheet.getChannelId(); } @@ -547,6 +596,7 @@ public final class WidgetVoiceBottomSheet extends AppBottomSheet { } private final void configureCenterContent(CenterContent centerContent, Channel channel) { + int i = 0; if (centerContent instanceof CenterContent.ListItems) { l0 l0Var = getBinding().b; m.checkNotNullExpressionValue(l0Var, "binding.empty"); @@ -581,7 +631,7 @@ public final class WidgetVoiceBottomSheet extends AppBottomSheet { m.throwUninitializedPropertyAccessException("participantsAdapter"); } callParticipantsAdapter5.setOnInviteFriendsClicked(new WidgetVoiceBottomSheet$configureCenterContent$4(this, channel)); - } else if (m.areEqual(centerContent, CenterContent.Empty.INSTANCE)) { + } else if (centerContent instanceof CenterContent.Empty) { l0 l0Var2 = getBinding().b; m.checkNotNullExpressionValue(l0Var2, "binding.empty"); LinearLayout linearLayout2 = l0Var2.a; @@ -589,12 +639,16 @@ public final class WidgetVoiceBottomSheet extends AppBottomSheet { linearLayout2.setVisibility(0); MaxHeightRecyclerView maxHeightRecyclerView2 = getBinding().h; m.checkNotNullExpressionValue(maxHeightRecyclerView2, "binding.voiceBottomSheetRecycler"); - maxHeightRecyclerView2.setVisibility(8); + CenterContent.Empty empty = (CenterContent.Empty) centerContent; + if (!(!empty.getItems().isEmpty())) { + i = 8; + } + maxHeightRecyclerView2.setVisibility(i); CallParticipantsAdapter callParticipantsAdapter6 = this.participantsAdapter; if (callParticipantsAdapter6 == null) { m.throwUninitializedPropertyAccessException("participantsAdapter"); } - callParticipantsAdapter6.setData(n.emptyList()); + callParticipantsAdapter6.setData(empty.getItems()); } else { throw new NoWhenBranchMatchedException(); } @@ -840,10 +894,20 @@ public final class WidgetVoiceBottomSheet extends AppBottomSheet { MGRecyclerAdapter.Companion companion = MGRecyclerAdapter.Companion; MaxHeightRecyclerView maxHeightRecyclerView = getBinding().h; d0.z.d.m.checkNotNullExpressionValue(maxHeightRecyclerView, "binding.voiceBottomSheetRecycler"); - this.participantsAdapter = (CallParticipantsAdapter) companion.configure(new CallParticipantsAdapter(maxHeightRecyclerView, true)); + CallParticipantsAdapter callParticipantsAdapter = (CallParticipantsAdapter) companion.configure(new CallParticipantsAdapter(maxHeightRecyclerView, true)); + this.participantsAdapter = callParticipantsAdapter; + if (callParticipantsAdapter == null) { + d0.z.d.m.throwUninitializedPropertyAccessException("participantsAdapter"); + } + callParticipantsAdapter.setOnEventClicked(new WidgetVoiceBottomSheet$onResume$1(this)); + CallParticipantsAdapter callParticipantsAdapter2 = this.participantsAdapter; + if (callParticipantsAdapter2 == null) { + d0.z.d.m.throwUninitializedPropertyAccessException("participantsAdapter"); + } + callParticipantsAdapter2.setOnStartEventClicked(new WidgetVoiceBottomSheet$onResume$2(this)); getBinding().h.setHasFixedSize(false); - ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(getViewModel().observeViewState(), this, null, 2, null), WidgetVoiceBottomSheet.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetVoiceBottomSheet$onResume$1(this), 62, (Object) null); - ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(getViewModel().observeEvents(), this, null, 2, null), WidgetVoiceBottomSheet.class, (Context) null, new WidgetVoiceBottomSheet$onResume$3(this), (Function1) null, (Function0) null, (Function0) null, new WidgetVoiceBottomSheet$onResume$2(this), 58, (Object) null); + ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(getViewModel().observeViewState(), this, null, 2, null), WidgetVoiceBottomSheet.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetVoiceBottomSheet$onResume$3(this), 62, (Object) null); + ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(getViewModel().observeEvents(), this, null, 2, null), WidgetVoiceBottomSheet.class, (Context) null, new WidgetVoiceBottomSheet$onResume$5(this), (Function1) null, (Function0) null, (Function0) null, new WidgetVoiceBottomSheet$onResume$4(this), 58, (Object) null); } @Override // com.discord.app.AppBottomSheet, androidx.fragment.app.Fragment diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$tryConnectToVoice$1.java b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$tryConnectToVoice$1.java index 09eba0aa4d..d3c2497695 100644 --- a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$tryConnectToVoice$1.java +++ b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$tryConnectToVoice$1.java @@ -13,7 +13,7 @@ import kotlin.jvm.functions.Function2; import kotlinx.coroutines.CoroutineScope; import rx.subjects.PublishSubject; /* compiled from: WidgetVoiceBottomSheetViewModel.kt */ -@e(c = "com.discord.widgets.voice.sheet.WidgetVoiceBottomSheetViewModel$tryConnectToVoice$1", f = "WidgetVoiceBottomSheetViewModel.kt", l = {153, 161}, m = "invokeSuspend") +@e(c = "com.discord.widgets.voice.sheet.WidgetVoiceBottomSheetViewModel$tryConnectToVoice$1", f = "WidgetVoiceBottomSheetViewModel.kt", l = {156, 164}, m = "invokeSuspend") public final class WidgetVoiceBottomSheetViewModel$tryConnectToVoice$1 extends k implements Function2, Object> { public final /* synthetic */ StoreMediaEngine $mediaEngine; public int label; diff --git a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel.java b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel.java index 0011642496..365dfdd682 100644 --- a/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel.java +++ b/app/src/main/java/com/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel.java @@ -12,6 +12,8 @@ import com.airbnb.lottie.parser.AnimatableValueParser; import com.discord.R; import com.discord.api.channel.Channel; import com.discord.api.guild.GuildMaxVideoChannelUsers; +import com.discord.api.guildscheduledevent.GuildScheduledEvent; +import com.discord.api.utcdatetime.UtcDateTime; import com.discord.app.AppLog; import com.discord.app.AppViewModel; import com.discord.models.domain.ModelApplicationStream; @@ -28,6 +30,8 @@ import com.discord.stores.StoreUserSettings; import com.discord.stores.StoreVoiceChannelSelected; import com.discord.stores.StoreVoiceParticipants; import com.discord.tooltips.TooltipManager; +import com.discord.utilities.guildscheduledevent.GuildScheduledEventTiming; +import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilitiesKt; import com.discord.utilities.permissions.VideoPermissionsManager; import com.discord.utilities.rx.ObservableExtensionsKt; import com.discord.utilities.streams.StreamContext; @@ -45,6 +49,7 @@ import d0.z.d.o; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Comparator; +import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; @@ -979,25 +984,68 @@ public final class WidgetVoiceBottomSheetViewModel extends AppViewModel, java.util.Iterator */ + /* JADX DEBUG: Type inference failed for r11v2. Raw type applied. Possible types: java.util.Iterator, java.util.Iterator */ private final List createConnectedListItems(Map map, String str, Channel channel, StoreState.Valid valid) { + GuildScheduledEvent guildScheduledEvent; ArrayList arrayList = new ArrayList(); + List guildScheduledEvents = valid.getCallModel().getGuildScheduledEvents(); ArrayList arrayList2 = new ArrayList(); + Iterator it = guildScheduledEvents.iterator(); + while (true) { + boolean z2 = false; + if (!it.hasNext()) { + break; + } + Object next = it.next(); + GuildScheduledEventTiming eventTiming = GuildScheduledEventUtilitiesKt.getEventTiming((GuildScheduledEvent) next); + if (eventTiming.isStartable() || eventTiming == GuildScheduledEventTiming.LIVE) { + z2 = true; + } + if (z2) { + arrayList2.add(next); + } + } + Iterator it2 = arrayList2.iterator(); + if (!it2.hasNext()) { + guildScheduledEvent = null; + } else { + Object next2 = it2.next(); + if (it2.hasNext()) { + UtcDateTime j = ((GuildScheduledEvent) next2).j(); + do { + Object next3 = it2.next(); + UtcDateTime j2 = ((GuildScheduledEvent) next3).j(); + if (j.compareTo(j2) > 0) { + next2 = next3; + j = j2; + } + } while (it2.hasNext()); + } + guildScheduledEvent = next2; + } + GuildScheduledEvent guildScheduledEvent2 = guildScheduledEvent; + if (guildScheduledEvent2 != null) { + arrayList.add(new CallParticipantsAdapter.ListItem.Event(guildScheduledEvent2, valid.getCallModel().canManageEvent(), valid.getCallModel().isConnected())); + } + ArrayList arrayList3 = new ArrayList(); for (StoreVoiceParticipants.VoiceUser voiceUser : map.values()) { if (voiceUser.isConnected() || AnimatableValueParser.t1(channel)) { - arrayList2.add(voiceUser); + arrayList3.add(voiceUser); } } - boolean z2 = !arrayList2.isEmpty(); - boolean z3 = str != null; - if (z2) { - List sortedWith = u.sortedWith(arrayList2, createUserItemsComparator(str)); - ArrayList arrayList3 = new ArrayList(d0.t.o.collectionSizeOrDefault(sortedWith, 10)); + boolean z3 = !arrayList3.isEmpty(); + boolean z4 = str != null; + if (z3) { + List sortedWith = u.sortedWith(arrayList3, createUserItemsComparator(str)); + ArrayList arrayList4 = new ArrayList(d0.t.o.collectionSizeOrDefault(sortedWith, 10)); for (StoreVoiceParticipants.VoiceUser voiceUser2 : sortedWith) { - arrayList3.add(new CallParticipantsAdapter.ListItem.VoiceUser(voiceUser2, AnimatableValueParser.t1(channel) && !voiceUser2.isConnected(), z3 && m.areEqual(str, voiceUser2.getWatchingStream()))); + arrayList4.add(new CallParticipantsAdapter.ListItem.VoiceUser(voiceUser2, AnimatableValueParser.t1(channel) && !voiceUser2.isConnected(), z4 && m.areEqual(str, voiceUser2.getWatchingStream()))); } - arrayList.addAll(arrayList3); + arrayList.addAll(arrayList4); } - if ((!arrayList.isEmpty()) && valid.getCallModel().canInvite()) { + if ((!arrayList3.isEmpty()) && valid.getCallModel().canInvite()) { arrayList.add(CallParticipantsAdapter.ListItem.Invite.INSTANCE); } return arrayList; @@ -1060,6 +1108,7 @@ public final class WidgetVoiceBottomSheetViewModel extends AppViewModel createConnectedListItems = createConnectedListItems(valid.getCallModel().getParticipants(), (activeStream == null || (stream2 = activeStream.getStream()) == null) ? null : stream2.getEncodedStreamKey(), channel, valid); + boolean z3 = false; for (CallParticipantsAdapter.ListItem listItem : createConnectedListItems) { if (listItem instanceof CallParticipantsAdapter.ListItem.VoiceUser) { StreamContext streamContext = ((CallParticipantsAdapter.ListItem.VoiceUser) listItem).getParticipant().getStreamContext(); @@ -1068,17 +1117,18 @@ public final class WidgetVoiceBottomSheetViewModel extends AppViewModel - - + + diff --git a/app/src/main/res/layout-v22/guild_scheduled_event_item_view.xml b/app/src/main/res/layout-v22/guild_scheduled_event_item_view.xml index 8260b2cabb..404eefab1b 100644 --- a/app/src/main/res/layout-v22/guild_scheduled_event_item_view.xml +++ b/app/src/main/res/layout-v22/guild_scheduled_event_item_view.xml @@ -1,9 +1,10 @@ - + - - + + + diff --git a/app/src/main/res/layout/guild_scheduled_event_date_view.xml b/app/src/main/res/layout/guild_scheduled_event_date_view.xml index 1592a6e7cf..40b9f17ed2 100644 --- a/app/src/main/res/layout/guild_scheduled_event_date_view.xml +++ b/app/src/main/res/layout/guild_scheduled_event_date_view.xml @@ -1,5 +1,5 @@ - - + + diff --git a/app/src/main/res/layout/guild_scheduled_event_item_view.xml b/app/src/main/res/layout/guild_scheduled_event_item_view.xml index feaa6c9c1f..a930db83eb 100644 --- a/app/src/main/res/layout/guild_scheduled_event_item_view.xml +++ b/app/src/main/res/layout/guild_scheduled_event_item_view.xml @@ -1,9 +1,10 @@ - + - - + + + diff --git a/app/src/main/res/layout/voice_user_list_item_event.xml b/app/src/main/res/layout/voice_user_list_item_event.xml new file mode 100644 index 0000000000..86df37bb60 --- /dev/null +++ b/app/src/main/res/layout/voice_user_list_item_event.xml @@ -0,0 +1,4 @@ + + + + diff --git a/app/src/main/res/layout/widget_voice_bottom_sheet.xml b/app/src/main/res/layout/widget_voice_bottom_sheet.xml index e473bba649..0a088f349e 100644 --- a/app/src/main/res/layout/widget_voice_bottom_sheet.xml +++ b/app/src/main/res/layout/widget_voice_bottom_sheet.xml @@ -3,7 +3,7 @@ - + diff --git a/app/src/main/res/values/public.xml b/app/src/main/res/values/public.xml index 1c64b525c8..bf7e50838d 100644 --- a/app/src/main/res/values/public.xml +++ b/app/src/main/res/values/public.xml @@ -6463,2899 +6463,2901 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9880,511 +9882,512 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f071a8dae0..abde3fb96c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1412,7 +1412,7 @@ Select a color Transparency Use Default - f2474bcd06b04f20a5facc1ba22fec29 + dc756968c8e343d6bc58c8068642e5a5 Coming Soon Slash command application {applicationName} {applicationName} application