From 41739cbd4144f4b0fff11d15151f9f46bcfc4140 Mon Sep 17 00:00:00 2001 From: Juby210 Date: Fri, 27 Aug 2021 09:24:56 +0200 Subject: [PATCH] 89.9 - Beta (89109) --- app/build.gradle | 4 +-- app/src/main/AndroidManifest.xml | 2 +- .../features/GrowthTeamFeatures.java | 33 ++++++++++++++----- .../list/WidgetGuildsListViewModel.java | 13 +++++--- .../widgets/settings/WidgetSettings.java | 2 +- ...dget_guilds_list_item_hub_verification.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 7 files changed, 38 insertions(+), 20 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1235ecc2cb..17f6e2eae5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { applicationId 'com.discord' minSdkVersion 21 targetSdkVersion 29 - versionCode 89108 - versionName "89.8 - Beta" + versionCode 89109 + versionName "89.9 - Beta" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9512140747..409dc6625a 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/utilities/features/GrowthTeamFeatures.java b/app/src/main/java/com/discord/utilities/features/GrowthTeamFeatures.java index bec157ea96..9a8ccfc1b4 100644 --- a/app/src/main/java/com/discord/utilities/features/GrowthTeamFeatures.java +++ b/app/src/main/java/com/discord/utilities/features/GrowthTeamFeatures.java @@ -10,41 +10,56 @@ public final class GrowthTeamFeatures { private GrowthTeamFeatures() { } + public static /* synthetic */ boolean isExperimentEnabled$default(GrowthTeamFeatures growthTeamFeatures, String str, int i, int i2, Object obj) { + if ((i2 & 1) != 0) { + i = 1; + } + return growthTeamFeatures.isExperimentEnabled(str, i); + } + public final Experiment getAndTrackWelcomeCTAExperiment(long j, boolean z2) { return StoreStream.Companion.getExperiments().getGuildExperiment("2021-06_welcome_cta", j, z2); } public final boolean isCategoriesEnabled() { - return isExperimentEnabled("2021-07_desktop_hub_categories"); + return isExperimentEnabled$default(this, "2021-07_desktop_hub_categories", 0, 1, null); } - public final boolean isExperimentEnabled(String str) { + public final boolean isExperimentEnabled(String str, int i) { m.checkNotNullParameter(str, "$this$isExperimentEnabled"); Experiment userExperiment = StoreStream.Companion.getExperiments().getUserExperiment(str, true); - return userExperiment != null && userExperiment.getBucket() == 1; + return userExperiment != null && userExperiment.getBucket() == i; + } + + public final boolean isHubDiscoveryEnabled() { + return isExperimentEnabled("2021-06_hub_discovery", 1) || isExperimentEnabled("2021-06_hub_discovery", 2); + } + + public final boolean isHubDiscoverySparkleEnabled() { + return isExperimentEnabled("2021-06_hub_discovery", 1); } public final boolean isHubEmailConnectionEnabled() { - return isExperimentEnabled("2021-06_hub_email_connection"); + return isExperimentEnabled$default(this, "2021-06_hub_email_connection", 0, 1, null); } public final boolean isHubEnabled() { - return isExperimentEnabled("2021-06_desktop_school_hubs"); + return isExperimentEnabled$default(this, "2021-06_desktop_school_hubs", 0, 1, null); } public final boolean isHubReportingEnabled() { - return isExperimentEnabled("2021-08_hub_reporting"); + return isExperimentEnabled$default(this, "2021-08_hub_reporting", 0, 1, null); } public final boolean isImpressionLoggingEnabled() { - return isExperimentEnabled("2021-08_impression_logging_enabled_android"); + return isExperimentEnabled$default(this, "2021-08_impression_logging_enabled_android", 0, 1, null); } public final boolean isMultiDomainEnabled() { - return isExperimentEnabled("2021-08_hub_multi_domain_mobile"); + return isExperimentEnabled$default(this, "2021-08_hub_multi_domain_mobile", 0, 1, null); } public final boolean isNetworkActionLoggingEnabled() { - return isExperimentEnabled("2021-07_network_action_logging_android"); + return isExperimentEnabled$default(this, "2021-07_network_action_logging_android", 0, 1, null); } } diff --git a/app/src/main/java/com/discord/widgets/guilds/list/WidgetGuildsListViewModel.java b/app/src/main/java/com/discord/widgets/guilds/list/WidgetGuildsListViewModel.java index eb13d7810b..a3cae70684 100644 --- a/app/src/main/java/com/discord/widgets/guilds/list/WidgetGuildsListViewModel.java +++ b/app/src/main/java/com/discord/widgets/guilds/list/WidgetGuildsListViewModel.java @@ -1262,8 +1262,8 @@ public final class WidgetGuildsListViewModel extends AppViewModel { /* JADX WARNING: Removed duplicated region for block: B:113:0x0471 */ /* JADX WARNING: Removed duplicated region for block: B:116:0x0490 */ /* JADX WARNING: Removed duplicated region for block: B:119:0x04ad */ - /* JADX WARNING: Removed duplicated region for block: B:122:0x04bf */ - /* JADX WARNING: Removed duplicated region for block: B:148:0x029d A[SYNTHETIC] */ + /* JADX WARNING: Removed duplicated region for block: B:128:0x04ca */ + /* JADX WARNING: Removed duplicated region for block: B:154:0x029d A[SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:50:0x0235 */ /* JADX WARNING: Removed duplicated region for block: B:56:0x0254 */ /* JADX WARNING: Removed duplicated region for block: B:59:0x0258 */ @@ -1272,6 +1272,7 @@ public final class WidgetGuildsListViewModel extends AppViewModel { boolean z2; ArrayList arrayList; ArrayList arrayList2; + GrowthTeamFeatures growthTeamFeatures; ArrayList arrayList3; Sequence sequence; HashMap hashMap; @@ -1505,8 +1506,9 @@ public final class WidgetGuildsListViewModel extends AppViewModel { arrayList2.add(new GuildListItem.UnavailableItem(storeState.getUnavailableGuilds().size())); } arrayList2.add(GuildListItem.CreateItem.INSTANCE); - if (GrowthTeamFeatures.INSTANCE.isHubEmailConnectionEnabled()) { - arrayList2.add(new GuildListItem.HubItem(storeState.getShowHubSparkle())); + growthTeamFeatures = GrowthTeamFeatures.INSTANCE; + if (growthTeamFeatures.isHubDiscoveryEnabled()) { + arrayList2.add(new GuildListItem.HubItem(storeState.getShowHubSparkle() && growthTeamFeatures.isHubDiscoverySparkleEnabled())); } if (storeState.isNewUser()) { arrayList2.add(dividerItem); @@ -1533,7 +1535,8 @@ public final class WidgetGuildsListViewModel extends AppViewModel { if (!storeState.getUnavailableGuilds().isEmpty()) { } arrayList2.add(GuildListItem.CreateItem.INSTANCE); - if (GrowthTeamFeatures.INSTANCE.isHubEmailConnectionEnabled()) { + growthTeamFeatures = GrowthTeamFeatures.INSTANCE; + if (growthTeamFeatures.isHubDiscoveryEnabled()) { } if (storeState.isNewUser()) { } 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 6eba54a875..22c5df59a3 100644 --- a/app/src/main/java/com/discord/widgets/settings/WidgetSettings.java +++ b/app/src/main/java/com/discord/widgets/settings/WidgetSettings.java @@ -321,7 +321,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 + " - 89.8 - Beta (89108)"); + textView.setText(string + " - 89.9 - Beta (89109)"); binding.f1972z.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/res/layout/widget_guilds_list_item_hub_verification.xml b/app/src/main/res/layout/widget_guilds_list_item_hub_verification.xml index 25cf31afe0..3fd1470ee1 100644 --- a/app/src/main/res/layout/widget_guilds_list_item_hub_verification.xml +++ b/app/src/main/res/layout/widget_guilds_list_item_hub_verification.xml @@ -1,6 +1,6 @@ - + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 523fda808e..8fcd092ae8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1374,7 +1374,7 @@ Select a color Transparency Use Default - 5fb8fed67b7d4dd39a484f75e5834940 + ff2cb8672d254680a075ca7644953ef6 Coming Soon Slash command application {applicationName} {applicationName} application