100.17 - Stable (100017)

This commit is contained in:
Juby210 2021-11-15 19:51:57 +01:00
parent 115c50ac46
commit fa4851527c
20 changed files with 216 additions and 181 deletions

View file

@ -10,8 +10,8 @@ android {
applicationId 'com.discord'
minSdkVersion 21
targetSdkVersion 30
versionCode 100016
versionName "100.16 - Stable"
versionCode 100017
versionName "100.17 - Stable"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View file

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

View file

@ -1,30 +1,31 @@
package com.discord.models.hubs;
import android.content.Context;
import androidx.annotation.StringRes;
import com.discord.R;
import com.discord.utilities.features.GrowthTeamFeatures;
import d0.z.d.m;
import java.util.Iterator;
import java.util.List;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: DirectoryEntryCategory.kt */
/* JADX INFO: Failed to restore enum class, 'enum' modifier removed */
public final class DirectoryEntryCategory extends Enum<DirectoryEntryCategory> {
private static final /* synthetic */ DirectoryEntryCategory[] $VALUES;
public static final DirectoryEntryCategory Class;
public enum DirectoryEntryCategory {
Home(-1, R.string.directory_category_all, 70),
Uncategorized(0, R.string.uncategorized, 0, 4, null),
SchoolClub(1, R.string.directory_category_school_club, 100),
Class(2, R.string.directory_category_class, 0, 4, null),
StudySocial(3, R.string.directory_category_study_social, 50),
SubjectMajor(4, R.string.directory_category_subject_major, 0, 4, null),
Misc(5, R.string.directory_category_miscellaneous, 0, 4, null),
HQSocial(1, R.string.directory_category_internal_1, 0, 4, null),
HQErgs(2, R.string.directory_category_internal_2, 0, 4, null),
HQMisc(3, R.string.directory_category_internal_3, 0, 4, null),
HQArchives(5, R.string.directory_category_internal_5, 0, 4, null);
public static final Companion Companion = new Companion(null);
public static final DirectoryEntryCategory HQArchives;
public static final DirectoryEntryCategory HQErgs;
public static final DirectoryEntryCategory HQMisc;
public static final DirectoryEntryCategory HQSocial;
public static final DirectoryEntryCategory Home;
public static final DirectoryEntryCategory Misc;
public static final DirectoryEntryCategory SchoolClub;
public static final DirectoryEntryCategory StudySocial;
public static final DirectoryEntryCategory SubjectMajor;
public static final DirectoryEntryCategory Uncategorized;
private final int idealSize;
private final int key;
private final Integer titleRes;
private final int titleRes;
/* compiled from: DirectoryEntryCategory.kt */
public static final class Companion {
@ -65,66 +66,15 @@ public final class DirectoryEntryCategory extends Enum<DirectoryEntryCategory> {
}
}
/* JADX DEBUG: Can't convert new array creation: APUT found in different block: 0x0026: APUT
(r0v1 com.discord.models.hubs.DirectoryEntryCategory[])
(0 ??[int, short, byte, char])
(r7v0 com.discord.models.hubs.DirectoryEntryCategory)
*/
static {
DirectoryEntryCategory[] directoryEntryCategoryArr = new DirectoryEntryCategory[11];
DirectoryEntryCategory directoryEntryCategory = new DirectoryEntryCategory("Home", 0, -1, Integer.valueOf(GrowthTeamFeatures.INSTANCE.hubRecommendationsEnabled() ? R.string.directory_category_recommended : R.string.directory_category_all), 70);
Home = directoryEntryCategory;
directoryEntryCategoryArr[0] = directoryEntryCategory;
DirectoryEntryCategory directoryEntryCategory2 = new DirectoryEntryCategory("Uncategorized", 1, 0, Integer.valueOf((int) R.string.uncategorized), 0, 4, null);
Uncategorized = directoryEntryCategory2;
directoryEntryCategoryArr[1] = directoryEntryCategory2;
DirectoryEntryCategory directoryEntryCategory3 = new DirectoryEntryCategory("SchoolClub", 2, 1, Integer.valueOf((int) R.string.directory_category_school_club), 100);
SchoolClub = directoryEntryCategory3;
directoryEntryCategoryArr[2] = directoryEntryCategory3;
DirectoryEntryCategory directoryEntryCategory4 = new DirectoryEntryCategory("Class", 3, 2, Integer.valueOf((int) R.string.directory_category_class), 0, 4, null);
Class = directoryEntryCategory4;
directoryEntryCategoryArr[3] = directoryEntryCategory4;
DirectoryEntryCategory directoryEntryCategory5 = new DirectoryEntryCategory("StudySocial", 4, 3, Integer.valueOf((int) R.string.directory_category_study_social), 50);
StudySocial = directoryEntryCategory5;
directoryEntryCategoryArr[4] = directoryEntryCategory5;
DirectoryEntryCategory directoryEntryCategory6 = new DirectoryEntryCategory("SubjectMajor", 5, 4, Integer.valueOf((int) R.string.directory_category_subject_major), 0, 4, null);
SubjectMajor = directoryEntryCategory6;
directoryEntryCategoryArr[5] = directoryEntryCategory6;
DirectoryEntryCategory directoryEntryCategory7 = new DirectoryEntryCategory("Misc", 6, 5, Integer.valueOf((int) R.string.directory_category_miscellaneous), 0, 4, null);
Misc = directoryEntryCategory7;
directoryEntryCategoryArr[6] = directoryEntryCategory7;
DirectoryEntryCategory directoryEntryCategory8 = new DirectoryEntryCategory("HQSocial", 7, 1, Integer.valueOf((int) R.string.directory_category_internal_1), 0, 4, null);
HQSocial = directoryEntryCategory8;
directoryEntryCategoryArr[7] = directoryEntryCategory8;
DirectoryEntryCategory directoryEntryCategory9 = new DirectoryEntryCategory("HQErgs", 8, 2, Integer.valueOf((int) R.string.directory_category_internal_2), 0, 4, null);
HQErgs = directoryEntryCategory9;
directoryEntryCategoryArr[8] = directoryEntryCategory9;
DirectoryEntryCategory directoryEntryCategory10 = new DirectoryEntryCategory("HQMisc", 9, 3, Integer.valueOf((int) R.string.directory_category_internal_3), 0, 4, null);
HQMisc = directoryEntryCategory10;
directoryEntryCategoryArr[9] = directoryEntryCategory10;
DirectoryEntryCategory directoryEntryCategory11 = new DirectoryEntryCategory("HQArchives", 10, 5, Integer.valueOf((int) R.string.directory_category_internal_5), 0, 4, null);
HQArchives = directoryEntryCategory11;
directoryEntryCategoryArr[10] = directoryEntryCategory11;
$VALUES = directoryEntryCategoryArr;
}
private DirectoryEntryCategory(String str, @StringRes int i, int i2, Integer num, int i3) {
this.key = i2;
this.titleRes = num;
private DirectoryEntryCategory(int i, @StringRes int i2, int i3) {
this.key = i;
this.titleRes = i2;
this.idealSize = i3;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ DirectoryEntryCategory(String str, int i, int i2, Integer num, int i3, int i4, DefaultConstructorMarker defaultConstructorMarker) {
this(str, i, i2, num, (i4 & 4) != 0 ? Integer.MAX_VALUE : i3);
}
public static DirectoryEntryCategory valueOf(String str) {
return (DirectoryEntryCategory) Enum.valueOf(DirectoryEntryCategory.class, str);
}
public static DirectoryEntryCategory[] values() {
return (DirectoryEntryCategory[]) $VALUES.clone();
public /* synthetic */ DirectoryEntryCategory(int i, int i2, int i3, int i4, DefaultConstructorMarker defaultConstructorMarker) {
this(i, i2, (i4 & 4) != 0 ? Integer.MAX_VALUE : i3);
}
public final int getIdealSize() {
@ -135,7 +85,14 @@ public final class DirectoryEntryCategory extends Enum<DirectoryEntryCategory> {
return this.key;
}
public final Integer getTitleRes() {
public final String getTitle(Context context) {
m.checkNotNullParameter(context, "context");
String string = context.getString((this != Home || !GrowthTeamFeatures.INSTANCE.hubRecommendationsEnabled()) ? this.titleRes : R.string.directory_category_recommended);
m.checkNotNullExpressionValue(string, "context.getString(\n … titleRes\n }\n )");
return string;
}
public final int getTitleRes() {
return this.titleRes;
}
}

View file

@ -48,8 +48,23 @@ public final class WidgetDirectoriesViewModel extends AppViewModel<ViewState> {
/* compiled from: WidgetDirectoriesViewModel.kt */
/* renamed from: com.discord.widgets.directories.WidgetDirectoriesViewModel$1 reason: invalid class name */
public static final /* synthetic */ class AnonymousClass1 extends k implements Function1<ViewState, Unit> {
public AnonymousClass1(WidgetDirectoriesViewModel widgetDirectoriesViewModel) {
public static final class AnonymousClass1<T, R> implements b<ViewState, Boolean> {
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
public final Boolean call(ViewState viewState) {
Channel channel = viewState.getChannel();
boolean z2 = true;
if (channel == null || !ChannelUtils.o(channel)) {
z2 = false;
}
return Boolean.valueOf(z2);
}
}
/* compiled from: WidgetDirectoriesViewModel.kt */
/* renamed from: com.discord.widgets.directories.WidgetDirectoriesViewModel$2 reason: invalid class name */
public static final /* synthetic */ class AnonymousClass2 extends k implements Function1<ViewState, Unit> {
public AnonymousClass2(WidgetDirectoriesViewModel widgetDirectoriesViewModel) {
super(1, widgetDirectoriesViewModel, WidgetDirectoriesViewModel.class, "updateViewState", "updateViewState(Ljava/lang/Object;)V", 0);
}
@ -68,9 +83,9 @@ public final class WidgetDirectoriesViewModel extends AppViewModel<ViewState> {
}
/* compiled from: WidgetDirectoriesViewModel.kt */
/* renamed from: com.discord.widgets.directories.WidgetDirectoriesViewModel$2 reason: invalid class name */
public static final class AnonymousClass2<T, R> implements b<Channel, Boolean> {
public static final AnonymousClass2 INSTANCE = new AnonymousClass2();
/* renamed from: com.discord.widgets.directories.WidgetDirectoriesViewModel$3 reason: invalid class name */
public static final class AnonymousClass3<T, R> implements b<Channel, Boolean> {
public static final AnonymousClass3 INSTANCE = new AnonymousClass3();
public final Boolean call(Channel channel) {
boolean z2 = true;
@ -82,12 +97,12 @@ public final class WidgetDirectoriesViewModel extends AppViewModel<ViewState> {
}
/* compiled from: WidgetDirectoriesViewModel.kt */
/* renamed from: com.discord.widgets.directories.WidgetDirectoriesViewModel$3 reason: invalid class name */
public static final class AnonymousClass3 extends o implements Function1<Channel, Unit> {
/* renamed from: com.discord.widgets.directories.WidgetDirectoriesViewModel$4 reason: invalid class name */
public static final class AnonymousClass4 extends o implements Function1<Channel, Unit> {
public final /* synthetic */ WidgetDirectoriesViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass3(WidgetDirectoriesViewModel widgetDirectoriesViewModel) {
public AnonymousClass4(WidgetDirectoriesViewModel widgetDirectoriesViewModel) {
super(1);
this.this$0 = widgetDirectoriesViewModel;
}
@ -345,21 +360,23 @@ public final class WidgetDirectoriesViewModel extends AppViewModel<ViewState> {
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDirectoriesViewModel(StoreDirectories storeDirectories, StoreChannelsSelected storeChannelsSelected, RestAPI restAPI, Observable<ViewState> observable) {
super(new ViewState(null, null, null, null, false, null, null, 127, null));
super(null);
m.checkNotNullParameter(storeDirectories, "directoriesStore");
m.checkNotNullParameter(storeChannelsSelected, "channelsSelectedStore");
m.checkNotNullParameter(restAPI, "restAPI");
m.checkNotNullParameter(observable, "storeObservable");
this.directoriesStore = storeDirectories;
this.restAPI = restAPI;
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.computationLatest(observable), this, null, 2, null), WidgetDirectoriesViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 62, (Object) null);
Observable x2 = ObservableExtensionsKt.computationLatest(observable).x(AnonymousClass1.INSTANCE);
m.checkNotNullExpressionValue(x2, "storeObservable\n …?.isDirectory() == true }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(x2, this, null, 2, null), WidgetDirectoriesViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass2(this), 62, (Object) null);
Observable<Channel> q = storeChannelsSelected.observeSelectedChannel().q();
m.checkNotNullExpressionValue(q, "channelsSelectedStore\n … .distinctUntilChanged()");
Observable<R> F = q.x(ObservableExtensionsKt$filterNull$1.INSTANCE).F(ObservableExtensionsKt$filterNull$2.INSTANCE);
m.checkNotNullExpressionValue(F, "filter { it != null }.map { it!! }");
Observable x2 = F.x(AnonymousClass2.INSTANCE);
m.checkNotNullExpressionValue(x2, "channelsSelectedStore\n …?.isDirectory() == true }");
ObservableExtensionsKt.appSubscribe$default(x2, WidgetDirectoriesViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass3(this), 62, (Object) null);
Observable x3 = F.x(AnonymousClass3.INSTANCE);
m.checkNotNullExpressionValue(x3, "channelsSelectedStore\n …?.isDirectory() == true }");
ObservableExtensionsKt.appSubscribe$default(x3, WidgetDirectoriesViewModel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass4(this), 62, (Object) null);
}
/* JADX WARNING: Illegal instructions before constructor call */

View file

@ -1,30 +1,12 @@
package com.discord.widgets.directories;
import com.discord.widgets.directories.WidgetDirectoriesViewModel;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import j0.k.b;
/* compiled from: WidgetDirectoryCategory.kt */
public final class WidgetDirectoryCategory$onViewBoundOrOnResume$1 extends o implements Function1<WidgetDirectoriesViewModel.ViewState, Unit> {
public final /* synthetic */ WidgetDirectoryCategory this$0;
public final class WidgetDirectoryCategory$onViewBoundOrOnResume$1<T, R> implements b<WidgetDirectoriesViewModel.ViewState, Boolean> {
public static final WidgetDirectoryCategory$onViewBoundOrOnResume$1 INSTANCE = new WidgetDirectoryCategory$onViewBoundOrOnResume$1();
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDirectoryCategory$onViewBoundOrOnResume$1(WidgetDirectoryCategory widgetDirectoryCategory) {
super(1);
this.this$0 = widgetDirectoryCategory;
}
/* 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(WidgetDirectoriesViewModel.ViewState viewState) {
invoke(viewState);
return Unit.a;
}
public final void invoke(WidgetDirectoriesViewModel.ViewState viewState) {
m.checkNotNullParameter(viewState, "it");
WidgetDirectoryCategory.access$configureUi(this.this$0, viewState);
public final Boolean call(WidgetDirectoriesViewModel.ViewState viewState) {
return Boolean.valueOf(viewState != null);
}
}

View file

@ -0,0 +1,31 @@
package com.discord.widgets.directories;
import com.discord.widgets.directories.WidgetDirectoriesViewModel;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetDirectoryCategory.kt */
public final class WidgetDirectoryCategory$onViewBoundOrOnResume$2 extends o implements Function1<WidgetDirectoriesViewModel.ViewState, Unit> {
public final /* synthetic */ WidgetDirectoryCategory this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDirectoryCategory$onViewBoundOrOnResume$2(WidgetDirectoryCategory widgetDirectoryCategory) {
super(1);
this.this$0 = widgetDirectoryCategory;
}
/* 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(WidgetDirectoriesViewModel.ViewState viewState) {
invoke(viewState);
return Unit.a;
}
public final void invoke(WidgetDirectoriesViewModel.ViewState viewState) {
WidgetDirectoryCategory widgetDirectoryCategory = this.this$0;
m.checkNotNullExpressionValue(viewState, "it");
WidgetDirectoryCategory.access$configureUi(widgetDirectoryCategory, viewState);
}
}

View file

@ -36,6 +36,7 @@ import kotlin.Lazy;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.reflect.KProperty;
import rx.Observable;
/* compiled from: WidgetDirectoryCategory.kt */
public final class WidgetDirectoryCategory extends AppFragment {
public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.b0(WidgetDirectoryCategory.class, "binding", "getBinding()Lcom/discord/databinding/WidgetDirectoryCategoryBinding;", 0)};
@ -127,6 +128,8 @@ public final class WidgetDirectoryCategory extends AppFragment {
@Override // com.discord.app.AppFragment
public void onViewBoundOrOnResume() {
super.onViewBoundOrOnResume();
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(getViewModel().observeViewState(), this, null, 2, null), WidgetDirectoryCategory.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetDirectoryCategory$onViewBoundOrOnResume$1(this), 62, (Object) null);
Observable<WidgetDirectoriesViewModel.ViewState> x2 = getViewModel().observeViewState().x(WidgetDirectoryCategory$onViewBoundOrOnResume$1.INSTANCE);
m.checkNotNullExpressionValue(x2, "viewModel\n .obser… .filter { it != null }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(x2, this, null, 2, null), WidgetDirectoryCategory.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetDirectoryCategory$onViewBoundOrOnResume$2(this), 62, (Object) null);
}
}

View file

@ -1,5 +1,6 @@
package com.discord.widgets.directories;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@ -17,20 +18,21 @@ import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
/* compiled from: WidgetDirectoryChannel.kt */
public final class WidgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1 extends o implements Function2<TabLayout.Tab, Integer, Unit> {
public final class WidgetDirectoryChannel$initializeUI$$inlined$apply$lambda$1 extends o implements Function2<TabLayout.Tab, Integer, Unit> {
public final /* synthetic */ TabLayout $this_apply;
public final /* synthetic */ WidgetDirectoryChannel this$0;
/* compiled from: WidgetDirectoryChannel.kt */
/* renamed from: com.discord.widgets.directories.WidgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1$1 reason: invalid class name */
/* renamed from: com.discord.widgets.directories.WidgetDirectoryChannel$initializeUI$$inlined$apply$lambda$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<WidgetDirectoriesViewModel.ViewState, Unit> {
public final /* synthetic */ int $position;
public final /* synthetic */ TabLayout.Tab $tab;
public final /* synthetic */ WidgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1 this$0;
public final /* synthetic */ WidgetDirectoryChannel$initializeUI$$inlined$apply$lambda$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(WidgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1 widgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1, int i, TabLayout.Tab tab) {
public AnonymousClass1(WidgetDirectoryChannel$initializeUI$$inlined$apply$lambda$1 widgetDirectoryChannel$initializeUI$$inlined$apply$lambda$1, int i, TabLayout.Tab tab) {
super(1);
this.this$0 = widgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1;
this.this$0 = widgetDirectoryChannel$initializeUI$$inlined$apply$lambda$1;
this.$position = i;
this.$tab = tab;
}
@ -49,7 +51,6 @@ public final class WidgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1 ex
Pair pair = (Pair) u.getOrNull(viewState.getMappedTabs(), this.$position);
if (pair != null) {
TabLayout.Tab tab = this.$tab;
String str2 = null;
View inflate = this.this$0.this$0.getLayoutInflater().inflate(R.layout.directory_channel_tab, (ViewGroup) null, false);
Objects.requireNonNull(inflate, "rootView");
TextView textView = (TextView) inflate;
@ -64,14 +65,12 @@ public final class WidgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1 ex
}
m.checkNotNullExpressionValue(textView, "tabView");
StringBuilder sb = new StringBuilder();
Integer titleRes = ((DirectoryEntryCategory) pair.getFirst()).getTitleRes();
if (titleRes != null) {
str2 = this.this$0.this$0.getString(titleRes.intValue());
}
sb.append(str2);
Context context = this.this$0.$this_apply.getContext();
m.checkNotNullExpressionValue(context, "context");
sb.append(((DirectoryEntryCategory) pair.getFirst()).getTitle(context));
sb.append(str);
textView.setText(sb.toString());
m.checkNotNullExpressionValue(mVar, "DirectoryChannelTabBindi…it) }}$count\"\n }");
m.checkNotNullExpressionValue(mVar, "DirectoryChannelTabBindi…text)}$count\"\n }");
tab.setCustomView(textView);
return;
}
@ -82,8 +81,9 @@ public final class WidgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1 ex
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1(WidgetDirectoryChannel widgetDirectoryChannel) {
public WidgetDirectoryChannel$initializeUI$$inlined$apply$lambda$1(TabLayout tabLayout, WidgetDirectoryChannel widgetDirectoryChannel) {
super(2);
this.$this_apply = tabLayout;
this.this$0 = widgetDirectoryChannel;
}

View file

@ -4,10 +4,10 @@ import android.view.View;
import c.a.d.j;
import com.discord.widgets.hubs.WidgetHubAddServer;
/* compiled from: WidgetDirectoryChannel.kt */
public final class WidgetDirectoryChannel$onViewBound$1 implements View.OnClickListener {
public final class WidgetDirectoryChannel$initializeUI$1 implements View.OnClickListener {
public final /* synthetic */ WidgetDirectoryChannel this$0;
public WidgetDirectoryChannel$onViewBound$1(WidgetDirectoryChannel widgetDirectoryChannel) {
public WidgetDirectoryChannel$initializeUI$1(WidgetDirectoryChannel widgetDirectoryChannel) {
this.this$0 = widgetDirectoryChannel;
}

View file

@ -14,11 +14,11 @@ import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetDirectoryChannel.kt */
public final class WidgetDirectoryChannel$onViewBound$5 extends o implements Function1<Long, Unit> {
public final class WidgetDirectoryChannel$initializeUI$5 extends o implements Function1<Long, Unit> {
public final /* synthetic */ WidgetDirectoryChannel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDirectoryChannel$onViewBound$5(WidgetDirectoryChannel widgetDirectoryChannel) {
public WidgetDirectoryChannel$initializeUI$5(WidgetDirectoryChannel widgetDirectoryChannel) {
super(1);
this.this$0 = widgetDirectoryChannel;
}

View file

@ -1,30 +1,12 @@
package com.discord.widgets.directories;
import com.discord.widgets.directories.WidgetDirectoriesViewModel;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import j0.k.b;
/* compiled from: WidgetDirectoryChannel.kt */
public final class WidgetDirectoryChannel$onViewBoundOrOnResume$1 extends o implements Function1<WidgetDirectoriesViewModel.ViewState, Unit> {
public final /* synthetic */ WidgetDirectoryChannel this$0;
public final class WidgetDirectoryChannel$onViewBoundOrOnResume$1<T, R> implements b<WidgetDirectoriesViewModel.ViewState, Boolean> {
public static final WidgetDirectoryChannel$onViewBoundOrOnResume$1 INSTANCE = new WidgetDirectoryChannel$onViewBoundOrOnResume$1();
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDirectoryChannel$onViewBoundOrOnResume$1(WidgetDirectoryChannel widgetDirectoryChannel) {
super(1);
this.this$0 = widgetDirectoryChannel;
}
/* 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(WidgetDirectoriesViewModel.ViewState viewState) {
invoke(viewState);
return Unit.a;
}
public final void invoke(WidgetDirectoriesViewModel.ViewState viewState) {
m.checkNotNullParameter(viewState, "it");
WidgetDirectoryChannel.access$configureUi(this.this$0, viewState);
public final Boolean call(WidgetDirectoriesViewModel.ViewState viewState) {
return Boolean.valueOf(viewState != null);
}
}

View file

@ -0,0 +1,28 @@
package com.discord.widgets.directories;
import com.discord.widgets.directories.WidgetDirectoriesViewModel;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetDirectoryChannel.kt */
public final class WidgetDirectoryChannel$onViewBoundOrOnResume$2 extends o implements Function1<WidgetDirectoriesViewModel.ViewState, Unit> {
public final /* synthetic */ WidgetDirectoryChannel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDirectoryChannel$onViewBoundOrOnResume$2(WidgetDirectoryChannel widgetDirectoryChannel) {
super(1);
this.this$0 = widgetDirectoryChannel;
}
/* 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(WidgetDirectoriesViewModel.ViewState viewState) {
invoke(viewState);
return Unit.a;
}
public final void invoke(WidgetDirectoriesViewModel.ViewState viewState) {
this.this$0.initializeUI();
}
}

View file

@ -0,0 +1,12 @@
package com.discord.widgets.directories;
import com.discord.widgets.directories.WidgetDirectoriesViewModel;
import j0.k.b;
/* compiled from: WidgetDirectoryChannel.kt */
public final class WidgetDirectoryChannel$onViewBoundOrOnResume$3<T, R> implements b<WidgetDirectoriesViewModel.ViewState, Boolean> {
public static final WidgetDirectoryChannel$onViewBoundOrOnResume$3 INSTANCE = new WidgetDirectoryChannel$onViewBoundOrOnResume$3();
public final Boolean call(WidgetDirectoriesViewModel.ViewState viewState) {
return Boolean.valueOf(viewState != null);
}
}

View file

@ -0,0 +1,31 @@
package com.discord.widgets.directories;
import com.discord.widgets.directories.WidgetDirectoriesViewModel;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetDirectoryChannel.kt */
public final class WidgetDirectoryChannel$onViewBoundOrOnResume$4 extends o implements Function1<WidgetDirectoriesViewModel.ViewState, Unit> {
public final /* synthetic */ WidgetDirectoryChannel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetDirectoryChannel$onViewBoundOrOnResume$4(WidgetDirectoryChannel widgetDirectoryChannel) {
super(1);
this.this$0 = widgetDirectoryChannel;
}
/* 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(WidgetDirectoriesViewModel.ViewState viewState) {
invoke(viewState);
return Unit.a;
}
public final void invoke(WidgetDirectoriesViewModel.ViewState viewState) {
WidgetDirectoryChannel widgetDirectoryChannel = this.this$0;
m.checkNotNullExpressionValue(viewState, "it");
WidgetDirectoryChannel.access$configureUi(widgetDirectoryChannel, viewState);
}
}

View file

@ -3,7 +3,6 @@ package com.discord.widgets.directories;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
@ -202,12 +201,9 @@ public final class WidgetDirectoryChannel extends AppFragment {
return (WidgetDirectoriesViewModel) this.viewModel$delegate.getValue();
}
@Override // com.discord.app.AppFragment
@SuppressLint({"SetTextI18n"})
public void onViewBound(View view) {
m.checkNotNullParameter(view, "view");
super.onViewBound(view);
getBinding().f.f178c.setOnClickListener(new WidgetDirectoryChannel$onViewBound$1(this));
public final void initializeUI() {
getBinding().f.f178c.setOnClickListener(new WidgetDirectoryChannel$initializeUI$1(this));
ServerDiscoveryHeader serverDiscoveryHeader = getBinding().f1843c;
serverDiscoveryHeader.setTitle(getString(R.string.hub_directory_search_title));
serverDiscoveryHeader.setDescription(getString(R.string.hub_directory_search_subtitle));
@ -215,18 +211,23 @@ public final class WidgetDirectoryChannel extends AppFragment {
TabLayout tabLayout = getBinding().d;
ViewPager2 viewPager2 = getBinding().e;
m.checkNotNullExpressionValue(viewPager2, "binding.viewPager");
ViewPager2ExtensionsKt.setUpWithViewPager2(tabLayout, viewPager2, new WidgetDirectoryChannel$onViewBound$$inlined$apply$lambda$1(this));
ViewPager2ExtensionsKt.setUpWithViewPager2(tabLayout, viewPager2, new WidgetDirectoryChannel$initializeUI$$inlined$apply$lambda$1(tabLayout, this));
bindGestureObservers$default(this, true, null, 2, null);
Observable<Long> q = StoreStream.Companion.getGuildSelected().observeSelectedGuildId().q();
m.checkNotNullExpressionValue(q, "StoreStream\n .get… .distinctUntilChanged()");
Observable<R> F = q.x(ObservableExtensionsKt$filterNull$1.INSTANCE).F(ObservableExtensionsKt$filterNull$2.INSTANCE);
m.checkNotNullExpressionValue(F, "filter { it != null }.map { it!! }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(F), WidgetDirectoryChannel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetDirectoryChannel$onViewBound$5(this), 62, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui(F), WidgetDirectoryChannel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetDirectoryChannel$initializeUI$5(this), 62, (Object) null);
}
@Override // com.discord.app.AppFragment
public void onViewBoundOrOnResume() {
super.onViewBoundOrOnResume();
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(getViewModel().observeViewState(), this, null, 2, null), WidgetDirectoryChannel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetDirectoryChannel$onViewBoundOrOnResume$1(this), 62, (Object) null);
Observable<WidgetDirectoriesViewModel.ViewState> y2 = getViewModel().observeViewState().x(WidgetDirectoryChannel$onViewBoundOrOnResume$1.INSTANCE).y();
m.checkNotNullExpressionValue(y2, "viewModel\n .obser…= null }\n .first()");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(y2, this, null, 2, null), WidgetDirectoryChannel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetDirectoryChannel$onViewBoundOrOnResume$2(this), 62, (Object) null);
Observable<WidgetDirectoriesViewModel.ViewState> x2 = getViewModel().observeViewState().x(WidgetDirectoryChannel$onViewBoundOrOnResume$3.INSTANCE);
m.checkNotNullExpressionValue(x2, "viewModel\n .obser… .filter { it != null }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.bindToComponentLifecycle$default(x2, this, null, 2, null), WidgetDirectoryChannel.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetDirectoryChannel$onViewBoundOrOnResume$4(this), 62, (Object) null);
}
}

View file

@ -10,11 +10,11 @@ import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetHubDescription.kt */
public final class WidgetHubDescription$configureUI$4 extends o implements Function1<Success<? extends DirectoryEntry>, Unit> {
public final class WidgetHubDescription$configureUI$3 extends o implements Function1<Success<? extends DirectoryEntry>, Unit> {
public final /* synthetic */ WidgetHubDescription this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetHubDescription$configureUI$4(WidgetHubDescription widgetHubDescription) {
public WidgetHubDescription$configureUI$3(WidgetHubDescription widgetHubDescription) {
super(1);
this.this$0 = widgetHubDescription;
}

View file

@ -1,7 +1,5 @@
package com.discord.widgets.hubs;
import android.content.Context;
import com.discord.R;
import com.discord.api.channel.Channel;
import com.discord.api.channel.ChannelUtils;
import com.discord.models.hubs.DirectoryEntryCategory;
@ -29,12 +27,7 @@ public final class WidgetHubDescription$selectorArgs$1 extends o implements Func
for (DirectoryEntryCategory directoryEntryCategory : categories) {
int key = directoryEntryCategory.getKey();
DirectoryEntryCategory category = this.this$0.getViewModel().getCategory();
boolean z2 = category != null && category.getKey() == directoryEntryCategory.getKey();
Context requireContext = this.this$0.requireContext();
Integer titleRes = directoryEntryCategory.getTitleRes();
String string = requireContext.getString(titleRes != null ? titleRes.intValue() : R.string.status_unknown);
m.checkNotNullExpressionValue(string, "requireContext().getStri… R.string.status_unknown)");
arrayList.add(new RadioSelectorItem(key, string, z2));
arrayList.add(new RadioSelectorItem(key, directoryEntryCategory.getTitle(this.this$0.requireContext()), category != null && category.getKey() == directoryEntryCategory.getKey()));
}
return arrayList;
}

View file

@ -64,8 +64,6 @@ public final class WidgetHubDescription extends AppFragment {
private final void configureUI(HubDescriptionState hubDescriptionState) {
int i;
String str;
Integer titleRes;
Integer titleRes2;
Context context = getContext();
if (context != null) {
m.checkNotNullExpressionValue(context, "context ?: return");
@ -76,21 +74,21 @@ public final class WidgetHubDescription extends AppFragment {
loadingButton.setText(getString(getArgs().isEditing() ? R.string.save : R.string.hub_add_server_cta));
TextView textView = getBinding().f1929c;
DirectoryEntryCategory selectedCategory = hubDescriptionState.getSelectedCategory();
if (selectedCategory == null || (titleRes2 = selectedCategory.getTitleRes()) == null) {
i = R.attr.colorTextMuted;
} else {
titleRes2.intValue();
if (selectedCategory != null) {
selectedCategory.getTitleRes();
i = R.attr.colorTextNormal;
} else {
i = R.attr.colorTextMuted;
}
textView.setTextColor(ColorCompat.getThemedColor(context, i));
TextView textView2 = getBinding().f1929c;
m.checkNotNullExpressionValue(textView2, "binding.category");
DirectoryEntryCategory selectedCategory2 = hubDescriptionState.getSelectedCategory();
if (selectedCategory2 == null || (titleRes = selectedCategory2.getTitleRes()) == null || (str = getString(titleRes.intValue())) == null) {
if (selectedCategory2 == null || (str = selectedCategory2.getTitle(context)) == null) {
str = getString(R.string.categories);
}
textView2.setText(str);
RestCallStateKt.handleResponse$default(hubDescriptionState.getAddServerAsync(), context, null, null, new WidgetHubDescription$configureUI$4(this), 6, null);
RestCallStateKt.handleResponse$default(hubDescriptionState.getAddServerAsync(), context, null, null, new WidgetHubDescription$configureUI$3(this), 6, null);
}
}

View file

@ -313,7 +313,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 + " - 100.16 - Stable (100016)");
textView.setText(string + " - 100.17 - Stable (100017)");
binding.A.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this));
binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE);
binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE);

View file

@ -1463,7 +1463,7 @@
<string name="color_picker_title">Select a color</string>
<string name="color_picker_transparency">Transparency</string>
<string name="color_picker_use_default">Use Default</string>
<string name="res_2131887543_com_crashlytics_android_build_id">2f3884e6e33c45309e112f80828c9f55</string>
<string name="res_2131887543_com_crashlytics_android_build_id">48535b5454d04429b303c353800b99cb</string>
<string name="coming_soon">Coming Soon</string>
<string name="command_accessibility_desc_app_header_item">Slash command application {applicationName}</string>
<string name="command_accessibility_desc_app_item">{applicationName} application</string>