94.7 - Beta (94107)

This commit is contained in:
Juby210 2021-09-29 09:33:53 +02:00
parent 1cb0ada0da
commit 8f6cfe8041
14 changed files with 71 additions and 29 deletions

View file

@ -10,8 +10,8 @@ android {
applicationId 'com.discord'
minSdkVersion 21
targetSdkVersion 29
versionCode 94106
versionName "94.6 - Beta"
versionCode 94107
versionName "94.7 - Beta"
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="94106" android:versionName="94.6 - 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="94107" android:versionName="94.7 - 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"/>

View file

@ -100,8 +100,10 @@ public final class GuildMember {
GuildRole guildRole2 = null;
for (Long l : list) {
long longValue = l.longValue();
if (!(map == null || (guildRole = map.get(Long.valueOf(longValue))) == null || guildRole.d() == null || !RoleUtils.rankIsHigher(guildRole, guildRole2))) {
guildRole2 = guildRole;
if (!(map == null || (guildRole = map.get(Long.valueOf(longValue))) == null)) {
if (((guildRole.d() == null && guildRole.j() == null) ? false : true) && RoleUtils.rankIsHigher(guildRole, guildRole2)) {
guildRole2 = guildRole;
}
}
}
return guildRole2;

View file

@ -1,6 +1,7 @@
package com.discord.utilities;
import android.graphics.Bitmap;
import android.os.Build;
import com.discord.utilities.images.MGImages;
import com.discord.utilities.images.MGImagesBitmap;
import d0.o;
@ -39,7 +40,7 @@ public final class ShareUtils$updateDirectShareTargets$4<T, R> implements b<List
int i2 = shareUtils$updateDirectShareTargets$4.$fullBitmapSize;
linkedHashMap.put(key, mGImages.centerBitmapInTransparentBitmap(bitmap, i, i, i2, i2));
}
return new MGImagesBitmap.CloseableBitmaps(linkedHashMap);
return new MGImagesBitmap.CloseableBitmaps(linkedHashMap, Build.VERSION.SDK_INT > 24);
}
}

View file

@ -128,9 +128,10 @@ public final class NotificationRenderer {
contentIntent.setFullScreenIntent(fullScreenIntent, true);
contentIntent.setVisibility(1);
}
Uri uri = null;
if (!extras.isEmpty()) {
contentIntent.setNumber(extras.size());
contentIntent.setStyle(getMessageStyle(context, notificationData, extras, new MGImagesBitmap.CloseableBitmaps(h0.emptyMap())));
contentIntent.setStyle(getMessageStyle(context, notificationData, extras, new MGImagesBitmap.CloseableBitmaps(h0.emptyMap(), false, 2, null)));
}
if (notificationData.getShouldUseBigText()) {
contentIntent.setStyle(new NotificationCompat.BigTextStyle().bigText(notificationData.getContent(context)));
@ -143,11 +144,11 @@ public final class NotificationRenderer {
}
Uri notificationSound = notificationData.getNotificationSound(context);
if (notificationSound != null) {
if (!(!settingsV2.isDisableSound())) {
notificationSound = null;
if (!settingsV2.isDisableSound()) {
uri = notificationSound;
}
if (notificationSound != null) {
contentIntent.setSound(notificationSound).setDefaults(INSTANCE.getNotificationDefaults(settingsV2.isDisableSound(), settingsV2.isDisableVibrate()) & -2);
if (uri != null) {
contentIntent.setSound(uri).setDefaults(INSTANCE.getNotificationDefaults(settingsV2.isDisableSound(), settingsV2.isDisableVibrate()) & -2);
}
}
}

View file

@ -49,6 +49,10 @@ public final class GrowthTeamFeatures {
return isExperimentEnabled$default(this, "2021-06_desktop_school_hubs", 0, 1, null);
}
public final boolean isHubNameKillSwitchEnabled() {
return isExperimentEnabled$default(this, "2021-09_hub_name_popup_kill_switch", 0, 1, null);
}
public final boolean isHubOnboardingEnabled() {
return isExperimentEnabled$default(this, "2021-08_hubs_in_organic_onboarding", 0, 1, null);
}

View file

@ -11,6 +11,6 @@ public final class MGImagesBitmap$getBitmaps$4<T, R> implements b<Map<String, Bi
public final MGImagesBitmap.CloseableBitmaps call(Map<String, Bitmap> map) {
m.checkNotNullExpressionValue(map, "it");
return new MGImagesBitmap.CloseableBitmaps(map);
return new MGImagesBitmap.CloseableBitmaps(map, false, 2, null);
}
}

View file

@ -19,6 +19,7 @@ import java.util.Map;
import java.util.Set;
import java.util.function.BiFunction;
import java.util.function.Function;
import kotlin.jvm.internal.DefaultConstructorMarker;
import rx.Observable;
/* compiled from: MGImagesBitmap.kt */
public final class MGImagesBitmap {
@ -26,11 +27,18 @@ public final class MGImagesBitmap {
/* compiled from: MGImagesBitmap.kt */
public static final class CloseableBitmaps implements Map<String, Bitmap>, Closeable, a {
private final boolean recycleBitmaps;
private final Map<String, Bitmap> underlyingMap;
public CloseableBitmaps(Map<String, Bitmap> map) {
public CloseableBitmaps(Map<String, Bitmap> map, boolean z2) {
m.checkNotNullParameter(map, "underlyingMap");
this.underlyingMap = map;
this.recycleBitmaps = z2;
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ CloseableBitmaps(Map map, boolean z2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(map, (i & 2) != 0 ? true : z2);
}
@Override // java.util.Map
@ -40,8 +48,10 @@ public final class MGImagesBitmap {
@Override // java.io.Closeable, java.lang.AutoCloseable
public void close() {
for (Map.Entry<String, Bitmap> entry : this.underlyingMap.entrySet()) {
entry.getValue().recycle();
if (this.recycleBitmaps) {
for (Map.Entry<String, Bitmap> entry : this.underlyingMap.entrySet()) {
entry.getValue().recycle();
}
}
}

View file

@ -5,6 +5,7 @@ import c.a.d.j;
import com.discord.models.guild.Guild;
import com.discord.models.member.GuildMember;
import com.discord.stores.StoreStream;
import com.discord.utilities.features.GrowthTeamFeatures;
import com.discord.widgets.hubs.HubAddNameArgs;
import com.discord.widgets.hubs.WidgetHubAddName;
import d0.g0.t;
@ -31,19 +32,18 @@ public final class WidgetDirectoryChannel$onViewBound$5 extends o implements Fun
}
public final void invoke(long j) {
Guild guild;
Context context;
StoreStream.Companion companion = StoreStream.Companion;
long selectedGuildId = companion.getGuildSelected().getSelectedGuildId();
GuildMember member = companion.getGuilds().getMember(selectedGuildId, companion.getUsers().getMe().getId());
String nick = member != null ? member.getNick() : null;
if (nick == null) {
nick = "";
}
Guild guild = companion.getGuilds().getGuild(selectedGuildId);
if (guild != null && (context = this.this$0.getContext()) != null) {
if (member != null && (guild = companion.getGuilds().getGuild(selectedGuildId)) != null && (context = this.this$0.getContext()) != null) {
m.checkNotNullExpressionValue(context, "context ?: return@appSubscribe");
if (selectedGuildId == j && guild.isHub() && t.isBlank(nick) && !companion.getDirectories().getAndSetSeenNamePrompt(selectedGuildId)) {
j.d(context, WidgetHubAddName.class, new HubAddNameArgs(guild.getId()));
if (this.this$0.isVisible() && selectedGuildId == j && guild.isHub()) {
String nick = member.getNick();
if ((nick == null || t.isBlank(nick)) && !companion.getDirectories().getAndSetSeenNamePrompt(selectedGuildId) && !GrowthTeamFeatures.INSTANCE.isHubNameKillSwitchEnabled()) {
j.d(context, WidgetHubAddName.class, new HubAddNameArgs(guild.getId()));
}
}
}
}

View file

@ -1,13 +1,37 @@
package com.discord.widgets.home;
import com.discord.models.guild.Guild;
import com.discord.stores.StoreNux;
import com.discord.stores.StoreStream;
import com.discord.utilities.features.GrowthTeamFeatures;
import j0.k.b;
import java.util.Collection;
import java.util.Iterator;
/* compiled from: WidgetHome.kt */
public final class WidgetHome$onViewBoundOrOnResume$8<T, R> implements b<StoreNux.NuxState, Boolean> {
public static final WidgetHome$onViewBoundOrOnResume$8 INSTANCE = new WidgetHome$onViewBoundOrOnResume$8();
public final Boolean call(StoreNux.NuxState nuxState) {
return Boolean.valueOf(GrowthTeamFeatures.INSTANCE.isHubEmailConnectionEnabled());
boolean z2;
Collection<Guild> values = StoreStream.Companion.getGuilds().getGuilds().values();
boolean z3 = false;
if (!(values instanceof Collection) || !values.isEmpty()) {
Iterator<T> it = values.iterator();
while (true) {
if (it.hasNext()) {
if (!(!it.next().isHub())) {
z2 = false;
break;
}
} else {
break;
}
}
}
z2 = true;
if (z2 && GrowthTeamFeatures.INSTANCE.isHubEmailConnectionEnabled()) {
z3 = true;
}
return Boolean.valueOf(z3);
}
}

View file

@ -651,7 +651,7 @@ public final class WidgetHome extends AppFragment implements OnTabSelectedListen
m.checkNotNullExpressionValue(x3, "StoreStream\n .get… .filter { it.firstOpen }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.takeSingleUntilTimeout$default(x3, 0, false, 1, null), this, null, 2, null), WidgetHome.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetHome$onViewBoundOrOnResume$7(this), 62, (Object) null);
Observable<StoreNux.NuxState> x4 = companion.getNux().getNuxState().x(WidgetHome$onViewBoundOrOnResume$8.INSTANCE);
m.checkNotNullExpressionValue(x4, "StoreStream\n .get…mailConnectionEnabled() }");
m.checkNotNullExpressionValue(x4, "StoreStream\n .get…ectionEnabled()\n }");
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.takeSingleUntilTimeout$default(x4, 0, false, 1, null), this, null, 2, null), WidgetHome.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetHome$onViewBoundOrOnResume$9(this), 62, (Object) null);
Observable x5 = StoreUser.observeMe$default(companion.getUsers(), false, 1, null).x(WidgetHome$onViewBoundOrOnResume$10.INSTANCE);
m.checkNotNullExpressionValue(x5, "StoreStream\n .get…hasUnreadUrgentMessages }");

View file

@ -76,7 +76,7 @@ public final class RoleIconView extends FrameLayout {
private final void showRoleIconToast(Context context, GuildRole guildRole) {
ModelEmojiUnicode modelEmojiUnicode;
EmojiNode emojiNode = hasIcon(guildRole) ? new EmojiNode(guildRole.g(), new RoleIconView$showRoleIconToast$1(guildRole), new EmojiNode.EmojiIdAndType.Unicode(""), DimenUtils.dpToPixels(24), DimenUtils.dpToPixels(24)) : (!hasUnicodeEmoji(guildRole) || (modelEmojiUnicode = StoreStream.Companion.getEmojis().getUnicodeEmojisNamesMap().get(guildRole.j())) == null) ? null : EmojiNode.Companion.from(modelEmojiUnicode, DimenUtils.dpToPixels(24));
EmojiNode emojiNode = hasIcon(guildRole) ? new EmojiNode(guildRole.g(), new RoleIconView$showRoleIconToast$1(guildRole), new EmojiNode.EmojiIdAndType.Unicode(""), DimenUtils.dpToPixels(24), DimenUtils.dpToPixels(24)) : (!hasUnicodeEmoji(guildRole) || (modelEmojiUnicode = StoreStream.Companion.getEmojis().getUnicodeEmojiSurrogateMap().get(guildRole.j())) == null) ? null : EmojiNode.Companion.from(modelEmojiUnicode, DimenUtils.dpToPixels(24));
if (emojiNode != null) {
RoleIconView$showRoleIconToast$renderContext$1 roleIconView$showRoleIconToast$renderContext$1 = new RoleIconView$showRoleIconToast$renderContext$1(context);
Set singleton = Collections.singleton(emojiNode);
@ -97,7 +97,7 @@ public final class RoleIconView extends FrameLayout {
m.checkNotNullExpressionValue(simpleDraweeView, "binding.roleIconIv");
IconUtils.setIcon$default(simpleDraweeView, guildRole, (int) R.dimen.role_icon_size, (MGImages.ChangeDetector) null, 8, (Object) null);
} else if (hasUnicodeEmoji(guildRole)) {
ModelEmojiUnicode modelEmojiUnicode = StoreStream.Companion.getEmojis().getUnicodeEmojisNamesMap().get(guildRole.j());
ModelEmojiUnicode modelEmojiUnicode = StoreStream.Companion.getEmojis().getUnicodeEmojiSurrogateMap().get(guildRole.j());
String imageUri = ModelEmojiUnicode.getImageUri(modelEmojiUnicode != null ? modelEmojiUnicode.getCodePoints() : null, getContext());
SimpleDraweeView simpleDraweeView2 = this.binding.b;
m.checkNotNullExpressionValue(simpleDraweeView2, "binding.roleIconIv");

View file

@ -314,7 +314,7 @@ public final class WidgetSettings extends AppFragment implements OnTabSelectedLi
TextView textView = binding.f;
m.checkNotNullExpressionValue(textView, "appInfoHeader");
String string = getString(R.string.app_information);
textView.setText(string + " - 94.6 - Beta (94106)");
textView.setText(string + " - 94.7 - Beta (94107)");
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

@ -1426,7 +1426,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_2131887506_com_crashlytics_android_build_id">15b5454eff894039bd9f0c0008c9217e</string>
<string name="res_2131887506_com_crashlytics_android_build_id">a40446995ab1449ca3570853cf0e79ff</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>