Compare commits
2 commits
9e62d7cc81
...
fa74d3261b
Author | SHA1 | Date | |
---|---|---|---|
fa74d3261b | |||
231993b3d5 |
20 changed files with 150 additions and 86 deletions
|
@ -10,8 +10,8 @@ android {
|
|||
applicationId 'com.discord'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 29
|
||||
versionCode 81107
|
||||
versionName "81.7 - Beta"
|
||||
versionCode 81111
|
||||
versionName "81.11 - Beta"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="81107" android:versionName="81.7 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="81111" android:versionName="81.11 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
|
||||
<uses-feature android:name="android.hardware.camera" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
|
||||
|
|
|
@ -172,7 +172,7 @@ public class App extends Application {
|
|||
loggingProvider.init(appLog);
|
||||
c.i.c.c.e(this);
|
||||
String str = null;
|
||||
if (BuildUtils.INSTANCE.isValidBuildVersionName("81.7 - Beta")) {
|
||||
if (BuildUtils.INSTANCE.isValidBuildVersionName("81.11 - Beta")) {
|
||||
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);
|
||||
} else {
|
||||
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false);
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.discord.restapi.RestAPIParams;
|
|||
import com.discord.stores.StoreAuthentication;
|
||||
import com.discord.stores.StoreInviteSettings;
|
||||
import com.discord.stores.StoreStream;
|
||||
import com.discord.utilities.analytics.AnalyticsTracker;
|
||||
import com.discord.utilities.rest.RestAPI;
|
||||
import com.discord.utilities.rx.ObservableExtensionsKt;
|
||||
import d0.z.d.k;
|
||||
|
@ -86,6 +87,7 @@ public final class StoreAuthentication$register$1<T, R> implements b<String, Obs
|
|||
companion.getUserSettingsSystem().setIsSyncThemeEnabled(false);
|
||||
this.this$0.this$0.setFingerprint(null, true);
|
||||
this.this$0.this$0.setAuthed(registerResponse.a());
|
||||
AnalyticsTracker.INSTANCE.appFirstLogin();
|
||||
companion.getNotifications().setEnabledInApp(true, false);
|
||||
companion.getNux().setFirstOpen(true);
|
||||
}
|
||||
|
|
|
@ -331,6 +331,7 @@ public final class StoreAuthentication extends Store {
|
|||
setAuthed(modelLoginResult.getToken());
|
||||
if (modelLoginResult.getToken() != null) {
|
||||
setAgeGateError(null);
|
||||
AnalyticsTracker.INSTANCE.appFirstLogin();
|
||||
}
|
||||
PublishSubject<Boolean> publishSubject = this.userInitiatedAuthEventSubject;
|
||||
publishSubject.j.onNext(Boolean.TRUE);
|
||||
|
|
|
@ -15,7 +15,7 @@ public final class StoreClientVersion extends Store {
|
|||
private int clientMinVersion;
|
||||
private final String clientMinVersionKey = "CLIENT_OUTDATED_KEY";
|
||||
private final SerializedSubject<Boolean, Boolean> clientOutdatedSubject = new SerializedSubject<>(BehaviorSubject.m0(Boolean.FALSE));
|
||||
private final int clientVersion = 81107;
|
||||
private final int clientVersion = 81111;
|
||||
|
||||
public static final /* synthetic */ void access$setClientMinVersion(StoreClientVersion storeClientVersion, int i) {
|
||||
storeClientVersion.setClientMinVersion(i);
|
||||
|
|
|
@ -77,7 +77,7 @@ public final class AnalyticSuperProperties {
|
|||
private final void setBaselineProperties() {
|
||||
String locale = Locale.getDefault().toString();
|
||||
m.checkNotNullExpressionValue(locale, "Locale.getDefault().toString()");
|
||||
updateSuperProperties(h0.mapOf(o.to("browser", "Discord Android"), o.to("browser_user_agent", "Discord-Android/81107"), o.to("client_build_number", 81107), o.to("client_version", "81.7 - Beta"), o.to("device", Build.MODEL + ", " + Build.PRODUCT), o.to("os", "Android"), o.to("os_sdk_version", String.valueOf(Build.VERSION.SDK_INT)), o.to("os_version", Build.VERSION.RELEASE), o.to("system_locale", t.replace$default(locale, "_", "-", false, 4, (Object) null))));
|
||||
updateSuperProperties(h0.mapOf(o.to("browser", "Discord Android"), o.to("browser_user_agent", "Discord-Android/81111"), o.to("client_build_number", 81111), o.to("client_version", "81.11 - Beta"), o.to("device", Build.MODEL + ", " + Build.PRODUCT), o.to("os", "Android"), o.to("os_sdk_version", String.valueOf(Build.VERSION.SDK_INT)), o.to("os_version", Build.VERSION.RELEASE), o.to("system_locale", t.replace$default(locale, "_", "-", false, 4, (Object) null))));
|
||||
}
|
||||
|
||||
private final void setSuperProperties(Map<String, ? extends Object> map) {
|
||||
|
|
|
@ -50,6 +50,7 @@ import com.discord.utilities.fcm.NotificationClient;
|
|||
import com.discord.utilities.intent.RouteHandlers;
|
||||
import com.discord.utilities.logging.Logger;
|
||||
import com.discord.utilities.permissions.PermissionUtils;
|
||||
import com.discord.utilities.persister.Persister;
|
||||
import com.discord.utilities.platform.Platform;
|
||||
import com.discord.utilities.rest.FileUploadAlertType;
|
||||
import com.discord.utilities.rx.ObservableExtensionsKt;
|
||||
|
@ -907,6 +908,14 @@ public final class AnalyticsTracker {
|
|||
tracker.track("app_exception_thrown", g0.mapOf(o.to("stacktrace", str)));
|
||||
}
|
||||
|
||||
public final void appFirstLogin() {
|
||||
Persister persister = new Persister("app_first_login", Boolean.TRUE);
|
||||
if (((Boolean) persister.get()).booleanValue()) {
|
||||
tracker.track("app_first_login", g0.mapOf(o.to("platform", "Android")));
|
||||
persister.set(Boolean.FALSE, true);
|
||||
}
|
||||
}
|
||||
|
||||
public final void applicationCommandBrowserJump(long j) {
|
||||
tracker.track("application_command_browser_jumped", g0.mapOf(o.to("target_application_id", Long.valueOf(j))));
|
||||
}
|
||||
|
|
|
@ -3,9 +3,11 @@ package com.discord.utilities.analytics;
|
|||
import android.net.Uri;
|
||||
import com.discord.stores.StoreUserSettingsSystem;
|
||||
import com.discord.utilities.analytics.AnalyticsUtils;
|
||||
import com.discord.utilities.persister.Persister;
|
||||
import com.discord.utilities.time.Clock;
|
||||
import d0.g;
|
||||
import d0.o;
|
||||
import d0.t.g0;
|
||||
import d0.t.h0;
|
||||
import d0.z.d.m;
|
||||
import java.util.Map;
|
||||
|
@ -14,6 +16,7 @@ import kotlin.Lazy;
|
|||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
/* compiled from: AppStartAnalyticsTracker.kt */
|
||||
public final class AppStartAnalyticsTracker {
|
||||
private static final String APP_FIRST_LAUNCHED = "app_first_launched";
|
||||
public static final Companion Companion = new Companion(null);
|
||||
private static final Lazy instance$delegate = g.lazy(AppStartAnalyticsTracker$Companion$instance$2.INSTANCE);
|
||||
private Long appOpenTimestamp;
|
||||
|
@ -103,6 +106,11 @@ public final class AppStartAnalyticsTracker {
|
|||
public final void appOpen(Uri uri, boolean z2, boolean z3) {
|
||||
m.checkNotNullParameter(uri, "uri");
|
||||
this.tracker.track(o.to("app_opened", null), 300000, new AppStartAnalyticsTracker$appOpen$1(this, z3, z2, uri));
|
||||
Persister persister = new Persister("app_first_launched", Boolean.TRUE);
|
||||
if (((Boolean) persister.get()).booleanValue()) {
|
||||
this.tracker.track("app_first_launched", g0.mapOf(o.to("platform", "Android")));
|
||||
persister.set(Boolean.FALSE, true);
|
||||
}
|
||||
}
|
||||
|
||||
public final void appUiViewed(String str, long j) {
|
||||
|
|
|
@ -176,7 +176,7 @@ public final class RestAPI implements RestAPIInterface {
|
|||
|
||||
@Override // com.discord.restapi.RequiredHeadersInterceptor.HeadersProvider
|
||||
public String getUserAgent() {
|
||||
return "Discord-Android/81107";
|
||||
return "Discord-Android/81111";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ public final class WidgetFatalCrash extends AppFragment {
|
|||
textView2.setText(b.j(this, 2131887893, objArr2, null, 4));
|
||||
TextView textView3 = getBinding().b;
|
||||
m.checkNotNullExpressionValue(textView3, "binding.fatalCrashAppVersion");
|
||||
textView3.setText(b.j(this, 2131887886, new Object[]{"81.7 - Beta"}, null, 4));
|
||||
textView3.setText(b.j(this, 2131887886, new Object[]{"81.11 - Beta"}, null, 4));
|
||||
TextView textView4 = getBinding().d;
|
||||
m.checkNotNullExpressionValue(textView4, "binding.fatalCrashOsVersion");
|
||||
textView4.setText(b.j(this, 2131887889, new Object[]{String.valueOf(Build.VERSION.SDK_INT)}, null, 4));
|
||||
|
|
|
@ -271,7 +271,7 @@ public final class WidgetSettings extends AppFragment implements OnTabSelectedLi
|
|||
TextView textView = binding.f;
|
||||
m.checkNotNullExpressionValue(textView, "appInfoHeader");
|
||||
String string = getString(2131886360);
|
||||
textView.setText(string + " - 81.7 - Beta (81107)");
|
||||
textView.setText(string + " - 81.11 - Beta (81111)");
|
||||
binding.w.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$2(this));
|
||||
binding.t.setOnClickListener(WidgetSettings$onViewBound$1$4.INSTANCE);
|
||||
binding.q.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE);
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
package com.discord.widgets.settings.connections;
|
||||
|
||||
import c.d.b.a.a;
|
||||
import com.discord.models.domain.ModelConnectedAccount;
|
||||
import com.discord.models.guild.Guild;
|
||||
import com.discord.widgets.settings.connections.WidgetSettingsUserConnectionsViewModel;
|
||||
import d0.z.d.m;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import rx.functions.Func2;
|
||||
|
@ -12,9 +14,14 @@ public final class WidgetSettingsUserConnectionsViewModel$Companion$observeStore
|
|||
public static final WidgetSettingsUserConnectionsViewModel$Companion$observeStores$1 INSTANCE = new WidgetSettingsUserConnectionsViewModel$Companion$observeStores$1();
|
||||
|
||||
public final WidgetSettingsUserConnectionsViewModel.StoreState call(List<ModelConnectedAccount> list, Map<Long, Guild> map) {
|
||||
m.checkNotNullExpressionValue(list, "accounts");
|
||||
ArrayList S = a.S(list, "accounts");
|
||||
for (Object obj : list) {
|
||||
if (!m.areEqual(((ModelConnectedAccount) obj).getType(), "contacts")) {
|
||||
S.add(obj);
|
||||
}
|
||||
}
|
||||
m.checkNotNullExpressionValue(map, "guilds");
|
||||
return new WidgetSettingsUserConnectionsViewModel.StoreState(list, map);
|
||||
return new WidgetSettingsUserConnectionsViewModel.StoreState(S, map);
|
||||
}
|
||||
|
||||
/* Return type fixed from 'java.lang.Object' to match base method */
|
||||
|
|
|
@ -91,7 +91,7 @@ public final class WidgetSettingsUserConnectionsViewModel extends AppViewModel<V
|
|||
private final Observable<StoreState> observeStores() {
|
||||
StoreStream.Companion companion = StoreStream.Companion;
|
||||
Observable<StoreState> j = Observable.j(companion.getUserConnections().observeConnectedAccounts(), companion.getGuilds().observeGuilds(), WidgetSettingsUserConnectionsViewModel$Companion$observeStores$1.INSTANCE);
|
||||
m.checkNotNullExpressionValue(j, "Observable.combineLatest…State(accounts, guilds) }");
|
||||
m.checkNotNullExpressionValue(j, "Observable.combineLatest…= \"contacts\" }, guilds) }");
|
||||
return j;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package com.discord.widgets.settings.premiumguild;
|
||||
|
||||
import com.discord.models.domain.ModelPremiumGuildSubscriptionSlot;
|
||||
import com.discord.stores.StoreStream;
|
||||
import com.discord.widgets.guilds.WidgetGuildSelector;
|
||||
import d0.t.m0;
|
||||
import d0.t.o0;
|
||||
import d0.z.d.m;
|
||||
import d0.z.d.o;
|
||||
import kotlin.Unit;
|
||||
|
@ -28,6 +29,6 @@ public final class WidgetSettingsPremiumGuildSubscription$showContent$1 extends
|
|||
public final void invoke(ModelPremiumGuildSubscriptionSlot modelPremiumGuildSubscriptionSlot, long j) {
|
||||
m.checkNotNullParameter(modelPremiumGuildSubscriptionSlot, "slot");
|
||||
WidgetSettingsPremiumGuildSubscription.access$getViewModel$p(this.this$0).transferClicked(modelPremiumGuildSubscriptionSlot, j);
|
||||
WidgetGuildSelector.Companion.launch$default(WidgetGuildSelector.Companion, this.this$0, null, false, 0, new WidgetGuildSelector.GuildFilterFunction(m0.setOf(Long.valueOf(j))), 14, null);
|
||||
WidgetGuildSelector.Companion.launch$default(WidgetGuildSelector.Companion, this.this$0, null, false, 0, new WidgetGuildSelector.GuildFilterFunction(o0.minus(StoreStream.Companion.getGuilds().getGuilds().keySet(), Long.valueOf(j))), 14, null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -359,39 +359,29 @@ public final class WidgetUserSheet extends AppBottomSheet {
|
|||
TextInputLayout textInputLayout2 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout2, "binding.userSheetNoteTextFieldWrap");
|
||||
textInputLayout2.setEnabled(true);
|
||||
String userNote = loaded.getUserNote();
|
||||
TextInputLayout textInputLayout3 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout3, "binding.userSheetNoteTextFieldWrap");
|
||||
if (!m.areEqual(userNote, ViewExtensions.getTextOrEmpty(textInputLayout3))) {
|
||||
TextInputLayout textInputLayout4 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout4, "binding.userSheetNoteTextFieldWrap");
|
||||
ViewExtensions.setText(textInputLayout4, loaded.getUserNote());
|
||||
}
|
||||
ViewExtensions.setTextIfDifferent(textInputLayout3, loaded.getUserNote());
|
||||
} else if (userNoteFetchState instanceof StoreUserNotes.UserNoteState.Loading) {
|
||||
TextInputLayout textInputLayout4 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout4, "binding.userSheetNoteTextFieldWrap");
|
||||
textInputLayout4.setHint(getString(2131890843));
|
||||
TextInputLayout textInputLayout5 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout5, "binding.userSheetNoteTextFieldWrap");
|
||||
textInputLayout5.setHint(getString(2131890843));
|
||||
textInputLayout5.setEnabled(false);
|
||||
TextInputLayout textInputLayout6 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout6, "binding.userSheetNoteTextFieldWrap");
|
||||
ViewExtensions.setText(textInputLayout6, "");
|
||||
ViewExtensions.setTextIfDifferent(textInputLayout6, loaded.getUserNote());
|
||||
} else if (userNoteFetchState instanceof StoreUserNotes.UserNoteState.Loaded) {
|
||||
TextInputLayout textInputLayout7 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout7, "binding.userSheetNoteTextFieldWrap");
|
||||
textInputLayout7.setEnabled(false);
|
||||
} else if (userNoteFetchState instanceof StoreUserNotes.UserNoteState.Loaded) {
|
||||
textInputLayout7.setHint(getString(2131891446));
|
||||
TextInputLayout textInputLayout8 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout8, "binding.userSheetNoteTextFieldWrap");
|
||||
textInputLayout8.setHint(getString(2131891446));
|
||||
textInputLayout8.setEnabled(true);
|
||||
TextInputLayout textInputLayout9 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout9, "binding.userSheetNoteTextFieldWrap");
|
||||
textInputLayout9.setEnabled(true);
|
||||
String userNote2 = loaded.getUserNote();
|
||||
TextInputLayout textInputLayout10 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout10, "binding.userSheetNoteTextFieldWrap");
|
||||
if (!m.areEqual(userNote2, ViewExtensions.getTextOrEmpty(textInputLayout10))) {
|
||||
TextInputLayout textInputLayout11 = getBinding().f1997z;
|
||||
m.checkNotNullExpressionValue(textInputLayout11, "binding.userSheetNoteTextFieldWrap");
|
||||
ViewExtensions.setText(textInputLayout11, loaded.getUserNote());
|
||||
}
|
||||
ViewExtensions.setTextIfDifferent(textInputLayout9, loaded.getUserNote());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ import com.discord.widgets.user.profile.UserProfileAdminView;
|
|||
import com.discord.widgets.user.profile.UserProfileConnectionsView;
|
||||
import com.discord.widgets.user.usersheet.UserProfileVoiceSettingsView;
|
||||
import com.discord.widgets.user.usersheet.WidgetUserSheet;
|
||||
import d0.g0.t;
|
||||
import d0.t.n;
|
||||
import d0.t.u;
|
||||
import d0.z.d.m;
|
||||
|
@ -1593,6 +1594,15 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
|
|||
return new UserProfileAdminView.ViewState(z4, z6, p1, z7, z8, z9, z10, z11, z12, z5, z3);
|
||||
}
|
||||
|
||||
private final List<Node<MessageRenderContext>> createAndProcessBioAstFromText(String str) {
|
||||
if (str == null || t.isBlank(str)) {
|
||||
return null;
|
||||
}
|
||||
List<Node<MessageRenderContext>> generateAst = generateAst(str);
|
||||
createMessagePreprocessor().process(generateAst);
|
||||
return generateAst;
|
||||
}
|
||||
|
||||
private final UserProfileConnectionsView.ViewState createConnectionsViewState(ModelUserProfile modelUserProfile, boolean z2, boolean z3) {
|
||||
List<ModelConnectedAccount> connectedAccounts = modelUserProfile.getConnectedAccounts();
|
||||
m.checkNotNullExpressionValue(connectedAccounts, "userProfile.connectedAccounts");
|
||||
|
@ -1665,20 +1675,28 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
|
|||
|
||||
/* JADX DEBUG: Multi-variable search result rejected for r14v1, resolved type: java.lang.Boolean */
|
||||
/* JADX DEBUG: Multi-variable search result rejected for r1v7, resolved type: java.lang.Float */
|
||||
/* JADX DEBUG: Multi-variable search result rejected for r1v15, resolved type: java.lang.Float */
|
||||
/* JADX DEBUG: Multi-variable search result rejected for r1v23, resolved type: java.lang.Float */
|
||||
/* JADX DEBUG: Multi-variable search result rejected for r14v4, resolved type: java.lang.Boolean */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARNING: Code restructure failed: missing block: B:19:0x008a, code lost:
|
||||
if (r8 != null) goto L_0x0091;
|
||||
/* JADX WARNING: Code restructure failed: missing block: B:105:0x022a, code lost:
|
||||
if ((r5 == null || r5.length() == 0) == false) goto L_0x022f;
|
||||
*/
|
||||
/* JADX WARNING: Removed duplicated region for block: B:68:0x01c4 */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:69:0x01c9 */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:71:0x01cc */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:74:0x01db */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:81:0x01ef */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:89:0x0203 */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:92:0x020f */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:93:0x0214 */
|
||||
/* JADX WARNING: Code restructure failed: missing block: B:19:0x008c, code lost:
|
||||
if (r8 != null) goto L_0x0093;
|
||||
*/
|
||||
/* JADX WARNING: Removed duplicated region for block: B:100:0x021e */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:113:0x023d */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:117:0x024a */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:118:0x024f */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:68:0x01c6 */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:69:0x01cb */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:72:0x01d6 */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:75:0x01db */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:76:0x01e0 */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:79:0x01e9 */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:88:0x0202 */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:91:0x0207 */
|
||||
/* JADX WARNING: Removed duplicated region for block: B:92:0x020c */
|
||||
private final void handleStoreState(StoreState storeState) {
|
||||
List list;
|
||||
ManageUserContext manageUserContext;
|
||||
|
@ -1688,11 +1706,14 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
|
|||
String str2;
|
||||
StreamContext streamContext;
|
||||
String encodedStreamKey;
|
||||
List<Node<MessageRenderContext>> generateAst;
|
||||
ViewState viewState;
|
||||
String str3;
|
||||
String userNote;
|
||||
StoreUserNotes.UserNoteState userNoteFetchState;
|
||||
ModelUserNote note;
|
||||
String note;
|
||||
ViewState viewState2;
|
||||
boolean z3;
|
||||
String str3;
|
||||
ModelUserNote note2;
|
||||
ModelApplicationStream stream;
|
||||
String str4;
|
||||
List<Long> roles;
|
||||
|
@ -1706,7 +1727,8 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
|
|||
Map<Long, GuildMember> computedMembers = storeState.getComputedMembers();
|
||||
Map<Long, GuildRole> guildRoles = storeState.getGuildRoles();
|
||||
Guild guild = storeState.getGuild();
|
||||
boolean z3 = me2.getId() == user.getId();
|
||||
boolean z4 = true;
|
||||
boolean z5 = me2.getId() == user.getId();
|
||||
boolean isSystemUser = user.isSystemUser();
|
||||
GuildMember guildMember = (GuildMember) a.e(user, computedMembers);
|
||||
GuildMember guildMember2 = computedMembers.get(Long.valueOf(me2.getId()));
|
||||
|
@ -1728,22 +1750,22 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
|
|||
str = null;
|
||||
manageUserContext = ManageUserContext.Companion.from(guild, me2, user, guildMember2.getRoles(), guildMember.getRoles(), storeState.getPermissions(), guildRoles);
|
||||
}
|
||||
boolean z4 = channel != null && channel.p() == me2.getId();
|
||||
boolean z6 = channel != null && channel.p() == me2.getId();
|
||||
int type = ModelUserRelationship.getType(storeState.getUserRelationshipType());
|
||||
VoiceState voiceState = (VoiceState) a.e(user, storeState.getMySelectedVoiceChannelVoiceStates());
|
||||
VoiceState voiceState2 = storeState.getMySelectedVoiceChannelVoiceStates().get(Long.valueOf(me2.getId()));
|
||||
boolean isInSameVoiceChannel = isInSameVoiceChannel(voiceState2, voiceState);
|
||||
boolean z5 = this.isVoiceContext || isInSameVoiceChannel;
|
||||
boolean selfMuted = z3 ? storeState.getSelfMuted() : storeState.getMuted();
|
||||
Boolean valueOf = z3 ? Boolean.valueOf(storeState.getSelfDeafened()) : str;
|
||||
if (!z3) {
|
||||
boolean z7 = this.isVoiceContext || isInSameVoiceChannel;
|
||||
boolean selfMuted = z5 ? storeState.getSelfMuted() : storeState.getMuted();
|
||||
Boolean valueOf = z5 ? Boolean.valueOf(storeState.getSelfDeafened()) : str;
|
||||
if (!z5) {
|
||||
z2 = isSystemUser;
|
||||
f = Float.valueOf(PerceptualVolumeUtils.amplitudeToPerceptual$default(PerceptualVolumeUtils.INSTANCE, storeState.getOutputVolume(), 0.0f, 2, str));
|
||||
} else {
|
||||
z2 = isSystemUser;
|
||||
f = str;
|
||||
}
|
||||
UserProfileVoiceSettingsView.ViewState viewState2 = new UserProfileVoiceSettingsView.ViewState(selfMuted, valueOf, f);
|
||||
UserProfileVoiceSettingsView.ViewState viewState3 = new UserProfileVoiceSettingsView.ViewState(selfMuted, valueOf, f);
|
||||
VoiceState voiceState3 = (VoiceState) a.e(user, storeState.getCurrentChannelVoiceStates());
|
||||
if (channel != null) {
|
||||
if (AnimatableValueParser.p1(channel)) {
|
||||
|
@ -1752,68 +1774,94 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
|
|||
str4 = guild.getName();
|
||||
}
|
||||
str2 = str4;
|
||||
UserProfileAdminView.ViewState createAdminViewState = createAdminViewState(channel, z4, z3, manageUserContext, voiceState3);
|
||||
UserProfileAdminView.ViewState createAdminViewState = createAdminViewState(channel, z6, z5, manageUserContext, voiceState3);
|
||||
ModelUserProfile userProfile = storeState.getUserProfile();
|
||||
UserProfileConnectionsView.ViewState createConnectionsViewState = createConnectionsViewState(userProfile, z3, z2);
|
||||
UserProfileConnectionsView.ViewState createConnectionsViewState = createConnectionsViewState(userProfile, z5, z2);
|
||||
streamContext = storeState.getStreamContext();
|
||||
encodedStreamKey = (streamContext != null || (stream = streamContext.getStream()) == null) ? null : stream.getEncodedStreamKey();
|
||||
if (encodedStreamKey != null && !this.fetchedPreviews.contains(encodedStreamKey)) {
|
||||
this.storeApplicationStreamPreviews.fetchStreamPreviewIfNotFetching(streamContext);
|
||||
this.fetchedPreviews.add(encodedStreamKey);
|
||||
}
|
||||
UserProfileStageActionsView.ViewState viewState3 = new UserProfileStageActionsView.ViewState(z3, storeState.getStageChannel(), storeState.m58getMyStageRolestwRsX0(), storeState.m59getUserStageRolestwRsX0(), storeState.getUserRequestToSpeakState(), isInSameVoiceChannel(voiceState2, voiceState), false, false, 192, null);
|
||||
UserProfileStageActionsView.ViewState viewState4 = new UserProfileStageActionsView.ViewState(z5, storeState.getStageChannel(), storeState.m58getMyStageRolestwRsX0(), storeState.m59getUserStageRolestwRsX0(), storeState.getUserRequestToSpeakState(), isInSameVoiceChannel(voiceState2, voiceState), false, false, 192, null);
|
||||
String d = userProfile.getUser().d();
|
||||
generateAst = d == null ? generateAst(d) : null;
|
||||
if (generateAst != null) {
|
||||
createMessagePreprocessor().process(generateAst);
|
||||
}
|
||||
List<Node<MessageRenderContext>> createAndProcessBioAstFromText = d == null ? createAndProcessBioAstFromText(d) : null;
|
||||
viewState = getViewState();
|
||||
if (!(viewState instanceof ViewState.Loaded)) {
|
||||
viewState = null;
|
||||
}
|
||||
ViewState.Loaded loaded = (ViewState.Loaded) viewState;
|
||||
if (loaded == null || (str3 = loaded.getUserNote()) == null) {
|
||||
userNoteFetchState = storeState.getUserNoteFetchState();
|
||||
if (!(userNoteFetchState instanceof StoreUserNotes.UserNoteState.Loaded)) {
|
||||
userNoteFetchState = null;
|
||||
userNote = loaded == null ? loaded.getUserNote() : null;
|
||||
userNoteFetchState = storeState.getUserNoteFetchState();
|
||||
if (!(userNoteFetchState instanceof StoreUserNotes.UserNoteState.Loaded)) {
|
||||
userNoteFetchState = null;
|
||||
}
|
||||
StoreUserNotes.UserNoteState.Loaded loaded2 = (StoreUserNotes.UserNoteState.Loaded) userNoteFetchState;
|
||||
note = (loaded2 != null || (note2 = loaded2.getNote()) == null) ? null : note2.getNote();
|
||||
viewState2 = getViewState();
|
||||
if (!(viewState2 instanceof ViewState.Loaded)) {
|
||||
viewState2 = null;
|
||||
}
|
||||
ViewState.Loaded loaded3 = (ViewState.Loaded) viewState2;
|
||||
z3 = !((loaded3 == null ? loaded3.getUserNoteFetchState() : null) instanceof StoreUserNotes.UserNoteState.Loading) && !(storeState.getUserNoteFetchState() instanceof StoreUserNotes.UserNoteState.Loading);
|
||||
if (userNote == null) {
|
||||
}
|
||||
z4 = false;
|
||||
if (!z3 || z4) {
|
||||
if (note != null) {
|
||||
str3 = note;
|
||||
updateViewState(new ViewState.Loaded(user, z5, z7, viewState3, voiceState3, storeState.getRichPresence(), str2, list, createAdminViewState, viewState4, channel, streamContext, guild == null ? guild.getName() : null, type, createConnectionsViewState, storeState.getUserNoteFetchState(), str3, isInSameVoiceChannel, createAndProcessBioAstFromText));
|
||||
this.mostRecentStoreState = storeState;
|
||||
}
|
||||
StoreUserNotes.UserNoteState.Loaded loaded2 = (StoreUserNotes.UserNoteState.Loaded) userNoteFetchState;
|
||||
str3 = (loaded2 != null || (note = loaded2.getNote()) == null) ? null : note.getNote();
|
||||
} else if (userNote != null) {
|
||||
str3 = userNote;
|
||||
updateViewState(new ViewState.Loaded(user, z5, z7, viewState3, voiceState3, storeState.getRichPresence(), str2, list, createAdminViewState, viewState4, channel, streamContext, guild == null ? guild.getName() : null, type, createConnectionsViewState, storeState.getUserNoteFetchState(), str3, isInSameVoiceChannel, createAndProcessBioAstFromText));
|
||||
this.mostRecentStoreState = storeState;
|
||||
}
|
||||
if (str3 == null) {
|
||||
str3 = "";
|
||||
}
|
||||
updateViewState(new ViewState.Loaded(user, z3, z5, viewState2, voiceState3, storeState.getRichPresence(), str2, list, createAdminViewState, viewState3, channel, streamContext, guild == null ? guild.getName() : null, type, createConnectionsViewState, storeState.getUserNoteFetchState(), str3, isInSameVoiceChannel, generateAst));
|
||||
str3 = "";
|
||||
updateViewState(new ViewState.Loaded(user, z5, z7, viewState3, voiceState3, storeState.getRichPresence(), str2, list, createAdminViewState, viewState4, channel, streamContext, guild == null ? guild.getName() : null, type, createConnectionsViewState, storeState.getUserNoteFetchState(), str3, isInSameVoiceChannel, createAndProcessBioAstFromText));
|
||||
this.mostRecentStoreState = storeState;
|
||||
}
|
||||
str2 = str;
|
||||
UserProfileAdminView.ViewState createAdminViewState = createAdminViewState(channel, z4, z3, manageUserContext, voiceState3);
|
||||
UserProfileAdminView.ViewState createAdminViewState = createAdminViewState(channel, z6, z5, manageUserContext, voiceState3);
|
||||
ModelUserProfile userProfile = storeState.getUserProfile();
|
||||
UserProfileConnectionsView.ViewState createConnectionsViewState = createConnectionsViewState(userProfile, z3, z2);
|
||||
UserProfileConnectionsView.ViewState createConnectionsViewState = createConnectionsViewState(userProfile, z5, z2);
|
||||
streamContext = storeState.getStreamContext();
|
||||
if (streamContext != null) {
|
||||
}
|
||||
this.storeApplicationStreamPreviews.fetchStreamPreviewIfNotFetching(streamContext);
|
||||
this.fetchedPreviews.add(encodedStreamKey);
|
||||
UserProfileStageActionsView.ViewState viewState3 = new UserProfileStageActionsView.ViewState(z3, storeState.getStageChannel(), storeState.m58getMyStageRolestwRsX0(), storeState.m59getUserStageRolestwRsX0(), storeState.getUserRequestToSpeakState(), isInSameVoiceChannel(voiceState2, voiceState), false, false, 192, null);
|
||||
UserProfileStageActionsView.ViewState viewState4 = new UserProfileStageActionsView.ViewState(z5, storeState.getStageChannel(), storeState.m58getMyStageRolestwRsX0(), storeState.m59getUserStageRolestwRsX0(), storeState.getUserRequestToSpeakState(), isInSameVoiceChannel(voiceState2, voiceState), false, false, 192, null);
|
||||
String d = userProfile.getUser().d();
|
||||
if (d == null) {
|
||||
}
|
||||
if (generateAst != null) {
|
||||
}
|
||||
viewState = getViewState();
|
||||
if (!(viewState instanceof ViewState.Loaded)) {
|
||||
}
|
||||
ViewState.Loaded loaded = (ViewState.Loaded) viewState;
|
||||
if (loaded == null) {
|
||||
}
|
||||
userNoteFetchState = storeState.getUserNoteFetchState();
|
||||
if (!(userNoteFetchState instanceof StoreUserNotes.UserNoteState.Loaded)) {
|
||||
}
|
||||
StoreUserNotes.UserNoteState.Loaded loaded2 = (StoreUserNotes.UserNoteState.Loaded) userNoteFetchState;
|
||||
if (loaded2 != null) {
|
||||
}
|
||||
if (str3 == null) {
|
||||
viewState2 = getViewState();
|
||||
if (!(viewState2 instanceof ViewState.Loaded)) {
|
||||
}
|
||||
updateViewState(new ViewState.Loaded(user, z3, z5, viewState2, voiceState3, storeState.getRichPresence(), str2, list, createAdminViewState, viewState3, channel, streamContext, guild == null ? guild.getName() : null, type, createConnectionsViewState, storeState.getUserNoteFetchState(), str3, isInSameVoiceChannel, generateAst));
|
||||
ViewState.Loaded loaded3 = (ViewState.Loaded) viewState2;
|
||||
if (!((loaded3 == null ? loaded3.getUserNoteFetchState() : null) instanceof StoreUserNotes.UserNoteState.Loading)) {
|
||||
}
|
||||
if (userNote == null) {
|
||||
}
|
||||
z4 = false;
|
||||
if (!z3) {
|
||||
}
|
||||
if (note != null) {
|
||||
}
|
||||
str3 = "";
|
||||
updateViewState(new ViewState.Loaded(user, z5, z7, viewState3, voiceState3, storeState.getRichPresence(), str2, list, createAdminViewState, viewState4, channel, streamContext, guild == null ? guild.getName() : null, type, createConnectionsViewState, storeState.getUserNoteFetchState(), str3, isInSameVoiceChannel, createAndProcessBioAstFromText));
|
||||
this.mostRecentStoreState = storeState;
|
||||
}
|
||||
|
||||
|
@ -1932,10 +1980,8 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
|
|||
}
|
||||
ViewState.Loaded loaded = (ViewState.Loaded) viewState;
|
||||
if (loaded != null && (storeState = this.mostRecentStoreState) != null && (userProfile = storeState.getUserProfile()) != null && (user = userProfile.getUser()) != null && (d = user.d()) != null) {
|
||||
List<Node<MessageRenderContext>> generateAst = generateAst(d);
|
||||
this.revealedBioIndices.add(Integer.valueOf(spoilerNode.getId()));
|
||||
createMessagePreprocessor().process(generateAst);
|
||||
updateViewState(ViewState.Loaded.copy$default(loaded, null, false, false, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, false, generateAst, 262143, null));
|
||||
updateViewState(ViewState.Loaded.copy$default(loaded, null, false, false, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, false, createAndProcessBioAstFromText(d), 262143, null));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2106,7 +2152,7 @@ public final class WidgetUserSheetViewModel extends AppViewModel<ViewState> {
|
|||
if (loaded == null) {
|
||||
return;
|
||||
}
|
||||
if (!m.areEqual(loaded.getUserNote(), str)) {
|
||||
if ((!m.areEqual(loaded.getUserNote(), str)) && !(loaded.getUserNoteFetchState() instanceof StoreUserNotes.UserNoteState.Loading)) {
|
||||
updateViewState(ViewState.Loaded.copy$default(loaded, null, false, false, null, null, null, null, null, null, null, null, null, null, 0, null, null, str, false, null, 458751, null));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
<TextView android:textSize="@dimen/uikit_textsize_xxlarge" android:id="@+id/contact_sync_suggestions_title" android:text="@string/contact_sync_suggestions_title" android:textAlignment="center" app:layout_constraintBottom_toTopOf="@+id/contact_sync_suggestions_subtitle" app:layout_constraintEnd_toEndOf="0" app:layout_constraintStart_toStartOf="0" app:layout_constraintTop_toTopOf="0" app:layout_constraintVertical_chainStyle="2" style="@style/res_2131952564_uikit_textview_h1_bold"/>
|
||||
<com.discord.utilities.view.text.LinkifiedTextView android:gravity="center_horizontal" android:id="@+id/contact_sync_suggestions_subtitle" android:paddingLeft="16dp" android:paddingRight="16dp" android:paddingBottom="16dp" android:layout_marginTop="8dp" android:text="@string/contact_sync_suggestions_subtitle" android:lineSpacingMultiplier="1" android:paddingHorizontal="16dp" app:layout_constraintEnd_toEndOf="0" app:layout_constraintStart_toStartOf="0" app:layout_constraintTop_toBottomOf="@+id/contact_sync_suggestions_title" style="@style/res_2131952572_uikit_textview_medium"/>
|
||||
<androidx.recyclerview.widget.RecyclerView android:id="@+id/contact_sync_suggestions_list_recycler" android:scrollbars="vertical" android:layout_width="match_parent" android:layout_height="0dp" android:layout_marginBottom="16dp" app:layout_constraintBottom_toTopOf="@+id/contact_sync_suggestions_submit_button" app:layout_constraintEnd_toEndOf="0" app:layout_constraintStart_toStartOf="0" app:layout_constraintTop_toBottomOf="@+id/contact_sync_suggestions_subtitle" style="@style/res_2131952603_uikit_viewgroup_recyclerview"/>
|
||||
<com.discord.views.LoadingButton android:id="@+id/contact_sync_suggestions_submit_button" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="8dp" app:layout_constraintBottom_toBottomOf="0" app:lb_disabled_alpha="0.6" app:lb_progress_color="@color/white" app:lb_text="@string/next"/>
|
||||
<com.discord.views.LoadingButton android:id="@+id/contact_sync_suggestions_submit_button" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="8dp" app:layout_constraintBottom_toBottomOf="0" app:lb_disabled_alpha="0.6" app:lb_progress_color="@color/white" app:lb_text="@string/next" app:lb_text_color="?attr/primary_100"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
<TextView android:textSize="@dimen/uikit_textsize_xxlarge" android:id="@+id/contact_sync_suggestions_title" android:text="@string/contact_sync_suggestions_title" android:textAlignment="center" app:layout_constraintBottom_toTopOf="@+id/contact_sync_suggestions_subtitle" app:layout_constraintEnd_toEndOf="0" app:layout_constraintStart_toStartOf="0" app:layout_constraintTop_toTopOf="0" app:layout_constraintVertical_chainStyle="2" style="@style/res_2131952564_uikit_textview_h1_bold"/>
|
||||
<com.discord.utilities.view.text.LinkifiedTextView android:gravity="center_horizontal" android:id="@+id/contact_sync_suggestions_subtitle" android:paddingLeft="16dp" android:paddingRight="16dp" android:paddingBottom="16dp" android:layout_marginTop="8dp" android:text="@string/contact_sync_suggestions_subtitle" android:lineSpacingMultiplier="1" app:layout_constraintEnd_toEndOf="0" app:layout_constraintStart_toStartOf="0" app:layout_constraintTop_toBottomOf="@+id/contact_sync_suggestions_title" style="@style/res_2131952572_uikit_textview_medium"/>
|
||||
<androidx.recyclerview.widget.RecyclerView android:id="@+id/contact_sync_suggestions_list_recycler" android:scrollbars="vertical" android:layout_width="match_parent" android:layout_height="0dp" android:layout_marginBottom="16dp" app:layout_constraintBottom_toTopOf="@+id/contact_sync_suggestions_submit_button" app:layout_constraintEnd_toEndOf="0" app:layout_constraintStart_toStartOf="0" app:layout_constraintTop_toBottomOf="@+id/contact_sync_suggestions_subtitle" style="@style/res_2131952603_uikit_viewgroup_recyclerview"/>
|
||||
<com.discord.views.LoadingButton android:id="@+id/contact_sync_suggestions_submit_button" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="8dp" app:layout_constraintBottom_toBottomOf="0" app:lb_disabled_alpha="0.6" app:lb_progress_color="@color/white" app:lb_text="@string/next"/>
|
||||
<com.discord.views.LoadingButton android:id="@+id/contact_sync_suggestions_submit_button" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="8dp" app:layout_constraintBottom_toBottomOf="0" app:lb_disabled_alpha="0.6" app:lb_progress_color="@color/white" app:lb_text="@string/next" app:lb_text_color="?attr/primary_100"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -1341,7 +1341,7 @@
|
|||
<string name="color_picker_presets">Presets</string>
|
||||
<string name="color_picker_title">Select a color</string>
|
||||
<string name="color_picker_transparency">Transparency</string>
|
||||
<string name="res_2131887421_com_crashlytics_android_build_id">db5bfdf98d1946d28c237d0a5609d9c3</string>
|
||||
<string name="res_2131887421_com_crashlytics_android_build_id">1d281d84cb934cf88d6151bf5e0686b8</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>
|
||||
|
|
Loading…
Reference in a new issue