82.12 - Beta (82112)
This commit is contained in:
parent
6ffa09f7cd
commit
d648b8a85f
18 changed files with 156 additions and 121 deletions
|
@ -10,8 +10,8 @@ android {
|
||||||
applicationId 'com.discord'
|
applicationId 'com.discord'
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 82111
|
versionCode 82112
|
||||||
versionName "82.11 - Beta"
|
versionName "82.12 - Beta"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="82111" android:versionName="82.11 - 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="82112" android:versionName="82.12 - 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-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
|
||||||
<uses-feature android:name="android.hardware.camera" android:required="false"/>
|
<uses-feature android:name="android.hardware.camera" android:required="false"/>
|
||||||
<uses-feature android:name="android.hardware.camera.autofocus" 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);
|
loggingProvider.init(appLog);
|
||||||
c.i.c.c.e(this);
|
c.i.c.c.e(this);
|
||||||
String str = null;
|
String str = null;
|
||||||
if (BuildUtils.INSTANCE.isValidBuildVersionName("82.11 - Beta")) {
|
if (BuildUtils.INSTANCE.isValidBuildVersionName("82.12 - Beta")) {
|
||||||
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);
|
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false);
|
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false);
|
||||||
|
|
|
@ -489,14 +489,15 @@ public final class Message {
|
||||||
return ((l != null ? l.longValue() : 0) & j) == j;
|
return ((l != null ? l.longValue() : 0) & j) == j;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean hasStickerItems() {
|
|
||||||
List<StickerPartial> list = this.stickerItems;
|
|
||||||
return !(list == null || list.isEmpty());
|
|
||||||
}
|
|
||||||
|
|
||||||
public final boolean hasStickers() {
|
public final boolean hasStickers() {
|
||||||
List<Sticker> list = this.stickers;
|
List<Sticker> list = this.stickers;
|
||||||
return !(list == null || list.isEmpty());
|
if (list == null || list.isEmpty()) {
|
||||||
|
List<StickerPartial> list2 = this.stickerItems;
|
||||||
|
if (list2 == null || list2.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final boolean hasThread() {
|
public final boolean hasThread() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ public final class StoreClientVersion extends Store {
|
||||||
private int clientMinVersion;
|
private int clientMinVersion;
|
||||||
private final String clientMinVersionKey = "CLIENT_OUTDATED_KEY";
|
private final String clientMinVersionKey = "CLIENT_OUTDATED_KEY";
|
||||||
private final SerializedSubject<Boolean, Boolean> clientOutdatedSubject = new SerializedSubject<>(BehaviorSubject.l0(Boolean.FALSE));
|
private final SerializedSubject<Boolean, Boolean> clientOutdatedSubject = new SerializedSubject<>(BehaviorSubject.l0(Boolean.FALSE));
|
||||||
private final int clientVersion = 82111;
|
private final int clientVersion = 82112;
|
||||||
|
|
||||||
public static final /* synthetic */ void access$setClientMinVersion(StoreClientVersion storeClientVersion, int i) {
|
public static final /* synthetic */ void access$setClientMinVersion(StoreClientVersion storeClientVersion, int i) {
|
||||||
storeClientVersion.setClientMinVersion(i);
|
storeClientVersion.setClientMinVersion(i);
|
||||||
|
|
|
@ -77,7 +77,7 @@ public final class AnalyticSuperProperties {
|
||||||
private final void setBaselineProperties() {
|
private final void setBaselineProperties() {
|
||||||
String locale = Locale.getDefault().toString();
|
String locale = Locale.getDefault().toString();
|
||||||
m.checkNotNullExpressionValue(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/82111"), o.to("client_build_number", 82111), o.to("client_version", "82.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))));
|
updateSuperProperties(h0.mapOf(o.to("browser", "Discord Android"), o.to("browser_user_agent", "Discord-Android/82112"), o.to("client_build_number", 82112), o.to("client_version", "82.12 - 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) {
|
private final void setSuperProperties(Map<String, ? extends Object> map) {
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
package com.discord.utilities.dsti;
|
|
||||||
|
|
||||||
import com.discord.utilities.dimen.DimenUtils;
|
|
||||||
import d0.z.d.o;
|
|
||||||
import kotlin.jvm.functions.Function0;
|
|
||||||
/* compiled from: StickerUtils.kt */
|
|
||||||
public final class StickerUtils$DEFAULT_HEADER_SIZE_PX$2 extends o implements Function0<Integer> {
|
|
||||||
public static final StickerUtils$DEFAULT_HEADER_SIZE_PX$2 INSTANCE = new StickerUtils$DEFAULT_HEADER_SIZE_PX$2();
|
|
||||||
|
|
||||||
public StickerUtils$DEFAULT_HEADER_SIZE_PX$2() {
|
|
||||||
super(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return type fixed from 'int' to match base method */
|
|
||||||
/* JADX WARNING: Unknown variable types count: 1 */
|
|
||||||
@Override // kotlin.jvm.functions.Function0
|
|
||||||
/* renamed from: invoke */
|
|
||||||
public final Integer mo1invoke() {
|
|
||||||
return DimenUtils.dpToPixels(1024);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -59,14 +59,13 @@ import org.json.JSONObject;
|
||||||
import rx.Observable;
|
import rx.Observable;
|
||||||
/* compiled from: StickerUtils.kt */
|
/* compiled from: StickerUtils.kt */
|
||||||
public final class StickerUtils {
|
public final class StickerUtils {
|
||||||
private static final Lazy DEFAULT_HEADER_SIZE_PX$delegate = g.lazy(StickerUtils$DEFAULT_HEADER_SIZE_PX$2.INSTANCE);
|
|
||||||
private static final Lazy DEFAULT_STICKER_SIZE_PX$delegate = g.lazy(StickerUtils$DEFAULT_STICKER_SIZE_PX$2.INSTANCE);
|
private static final Lazy DEFAULT_STICKER_SIZE_PX$delegate = g.lazy(StickerUtils$DEFAULT_STICKER_SIZE_PX$2.INSTANCE);
|
||||||
public static final StickerUtils INSTANCE = new StickerUtils();
|
public static final StickerUtils INSTANCE = new StickerUtils();
|
||||||
public static final int MAXIMUM_LENGTH_STICKER_TEXT_SUGGESTIONS = 50;
|
public static final int MAXIMUM_LENGTH_STICKER_TEXT_SUGGESTIONS = 50;
|
||||||
public static final int MAXIMUM_WORD_COUNT_STICKER_TEXT_SUGGESTIONS = 5;
|
private static final int MAXIMUM_WORD_COUNT_STICKER_TEXT_SUGGESTIONS = 5;
|
||||||
public static final int MINIMUM_LENGTH_STICKER_TEXT_SUGGESTIONS = 3;
|
public static final int MINIMUM_LENGTH_STICKER_TEXT_SUGGESTIONS = 3;
|
||||||
public static final int NUM_STICKERS_AUTO_SUGGEST = 4;
|
public static final int NUM_STICKERS_AUTO_SUGGEST = 4;
|
||||||
public static final long STICKER_APPLICATION_ID = 710982414301790216L;
|
private static final long STICKER_APPLICATION_ID = 710982414301790216L;
|
||||||
|
|
||||||
/* compiled from: StickerUtils.kt */
|
/* compiled from: StickerUtils.kt */
|
||||||
public enum StickerSendability {
|
public enum StickerSendability {
|
||||||
|
@ -299,10 +298,6 @@ public final class StickerUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getDEFAULT_HEADER_SIZE_PX() {
|
|
||||||
return ((Number) DEFAULT_HEADER_SIZE_PX$delegate.getValue()).intValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
public final int getDEFAULT_STICKER_SIZE_PX() {
|
public final int getDEFAULT_STICKER_SIZE_PX() {
|
||||||
return ((Number) DEFAULT_STICKER_SIZE_PX$delegate.getValue()).intValue();
|
return ((Number) DEFAULT_STICKER_SIZE_PX$delegate.getValue()).intValue();
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,7 @@ public final class RestAPI implements RestAPIInterface {
|
||||||
|
|
||||||
@Override // com.discord.restapi.RequiredHeadersInterceptor.HeadersProvider
|
@Override // com.discord.restapi.RequiredHeadersInterceptor.HeadersProvider
|
||||||
public String getUserAgent() {
|
public String getUserAgent() {
|
||||||
return "Discord-Android/82111";
|
return "Discord-Android/82112";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
private final MessageManager messageManager;
|
private final MessageManager messageManager;
|
||||||
private final StorePermissions permissionStore;
|
private final StorePermissions permissionStore;
|
||||||
private final BehaviorSubject<String> searchSubject;
|
private final BehaviorSubject<String> searchSubject;
|
||||||
private final BehaviorSubject<Long> selectedPackIdSubject;
|
private final BehaviorSubject<Long> selectedCategoryIdSubject;
|
||||||
private int stickerCountToDisplayForStore;
|
private int stickerCountToDisplayForStore;
|
||||||
private final StoreStickers stickersStore;
|
private final StoreStickers stickersStore;
|
||||||
private final StoreUser userStore;
|
private final StoreUser userStore;
|
||||||
|
@ -105,22 +105,35 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
this();
|
this();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final /* synthetic */ List access$buildGuildStickersListItems(Companion companion, List list, Guild guild, int i, MeUser meUser, Channel channel, long j) {
|
public static final /* synthetic */ List access$buildGuildStickersListItems(Companion companion, List list, Guild guild, int i, String str, MeUser meUser, Locale locale, Channel channel, long j) {
|
||||||
return companion.buildGuildStickersListItems(list, guild, i, meUser, channel, j);
|
return companion.buildGuildStickersListItems(list, guild, i, str, meUser, locale, channel, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final /* synthetic */ List access$buildStickerListItems(Companion companion, ModelStickerPack modelStickerPack, String str, int i, Locale locale, MeUser meUser) {
|
public static final /* synthetic */ List access$buildStickerListItems(Companion companion, ModelStickerPack modelStickerPack, String str, int i, Locale locale, MeUser meUser) {
|
||||||
return companion.buildStickerListItems(modelStickerPack, str, i, locale, meUser);
|
return companion.buildStickerListItems(modelStickerPack, str, i, locale, meUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final List<MGRecyclerDataPayload> buildGuildStickersListItems(List<Sticker> list, Guild guild, int i, MeUser meUser, Channel channel, long j) {
|
private final List<MGRecyclerDataPayload> buildGuildStickersListItems(List<Sticker> list, Guild guild, int i, String str, MeUser meUser, Locale locale, Channel channel, long j) {
|
||||||
ArrayList arrayList = new ArrayList();
|
ArrayList arrayList = new ArrayList();
|
||||||
for (Sticker sticker : list) {
|
for (Sticker sticker : list) {
|
||||||
|
String h = sticker.h();
|
||||||
|
Objects.requireNonNull(h, "null cannot be cast to non-null type java.lang.String");
|
||||||
|
String lowerCase = h.toLowerCase(locale);
|
||||||
|
m.checkNotNullExpressionValue(lowerCase, "(this as java.lang.String).toLowerCase(locale)");
|
||||||
|
if (!w.contains$default((CharSequence) lowerCase, (CharSequence) str, false, 2, (Object) null)) {
|
||||||
|
String j2 = sticker.j();
|
||||||
|
Objects.requireNonNull(j2, "null cannot be cast to non-null type java.lang.String");
|
||||||
|
String lowerCase2 = j2.toLowerCase(locale);
|
||||||
|
m.checkNotNullExpressionValue(lowerCase2, "(this as java.lang.String).toLowerCase(locale)");
|
||||||
|
if (w.contains$default((CharSequence) lowerCase2, (CharSequence) str, false, 2, (Object) null)) {
|
||||||
|
}
|
||||||
|
}
|
||||||
arrayList.add(new StickerItem(sticker, i, StickerItem.Mode.OWNED, StickerUtils.INSTANCE.getStickerSendability(sticker, meUser, channel, Long.valueOf(j))));
|
arrayList.add(new StickerItem(sticker, i, StickerItem.Mode.OWNED, StickerUtils.INSTANCE.getStickerSendability(sticker, meUser, channel, Long.valueOf(j))));
|
||||||
}
|
}
|
||||||
if (!list.isEmpty()) {
|
if ((str.length() > 0) && arrayList.isEmpty()) {
|
||||||
arrayList.add(0, new HeaderItem(new HeaderType.GuildItem(guild)));
|
return n.emptyList();
|
||||||
}
|
}
|
||||||
|
arrayList.add(0, new HeaderItem(new HeaderType.GuildItem(guild)));
|
||||||
return arrayList;
|
return arrayList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +242,7 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
private final boolean isStickersSelectedTab;
|
private final boolean isStickersSelectedTab;
|
||||||
private final MeUser meUser;
|
private final MeUser meUser;
|
||||||
private final String searchInputStringUpper;
|
private final String searchInputStringUpper;
|
||||||
private final Long selectedPackId;
|
private final Long selectedCategoryId;
|
||||||
private final int stickerAnimationSettings;
|
private final int stickerAnimationSettings;
|
||||||
|
|
||||||
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: java.util.Map<java.lang.Long, ? extends java.util.Map<java.lang.Long, com.discord.api.sticker.Sticker>> */
|
/* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: java.util.Map<java.lang.Long, ? extends java.util.Map<java.lang.Long, com.discord.api.sticker.Sticker>> */
|
||||||
|
@ -249,7 +262,7 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
this.frequentlyUsedStickerIds = list2;
|
this.frequentlyUsedStickerIds = list2;
|
||||||
this.searchInputStringUpper = str;
|
this.searchInputStringUpper = str;
|
||||||
this.stickerAnimationSettings = i;
|
this.stickerAnimationSettings = i;
|
||||||
this.selectedPackId = l;
|
this.selectedCategoryId = l;
|
||||||
this.meUser = meUser;
|
this.meUser = meUser;
|
||||||
this.isStickersSelectedTab = z2;
|
this.isStickersSelectedTab = z2;
|
||||||
this.currentChannel = channel;
|
this.currentChannel = channel;
|
||||||
|
@ -257,7 +270,7 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static /* synthetic */ Loaded copy$default(Loaded loaded, LinkedHashMap linkedHashMap, Map map, List list, List list2, String str, int i, Long l, MeUser meUser, boolean z2, Channel channel, long j, int i2, Object obj) {
|
public static /* synthetic */ Loaded copy$default(Loaded loaded, LinkedHashMap linkedHashMap, Map map, List list, List list2, String str, int i, Long l, MeUser meUser, boolean z2, Channel channel, long j, int i2, Object obj) {
|
||||||
return loaded.copy((i2 & 1) != 0 ? loaded.allGuilds : linkedHashMap, (i2 & 2) != 0 ? loaded.guildStickers : map, (i2 & 4) != 0 ? loaded.enabledStickerPacks : list, (i2 & 8) != 0 ? loaded.frequentlyUsedStickerIds : list2, (i2 & 16) != 0 ? loaded.searchInputStringUpper : str, (i2 & 32) != 0 ? loaded.stickerAnimationSettings : i, (i2 & 64) != 0 ? loaded.selectedPackId : l, (i2 & 128) != 0 ? loaded.meUser : meUser, (i2 & 256) != 0 ? loaded.isStickersSelectedTab : z2, (i2 & 512) != 0 ? loaded.currentChannel : channel, (i2 & 1024) != 0 ? loaded.currentChannelPermissions : j);
|
return loaded.copy((i2 & 1) != 0 ? loaded.allGuilds : linkedHashMap, (i2 & 2) != 0 ? loaded.guildStickers : map, (i2 & 4) != 0 ? loaded.enabledStickerPacks : list, (i2 & 8) != 0 ? loaded.frequentlyUsedStickerIds : list2, (i2 & 16) != 0 ? loaded.searchInputStringUpper : str, (i2 & 32) != 0 ? loaded.stickerAnimationSettings : i, (i2 & 64) != 0 ? loaded.selectedCategoryId : l, (i2 & 128) != 0 ? loaded.meUser : meUser, (i2 & 256) != 0 ? loaded.isStickersSelectedTab : z2, (i2 & 512) != 0 ? loaded.currentChannel : channel, (i2 & 1024) != 0 ? loaded.currentChannelPermissions : j);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final LinkedHashMap<Long, Guild> component1() {
|
public final LinkedHashMap<Long, Guild> component1() {
|
||||||
|
@ -293,7 +306,7 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Long component7() {
|
public final Long component7() {
|
||||||
return this.selectedPackId;
|
return this.selectedCategoryId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final MeUser component8() {
|
public final MeUser component8() {
|
||||||
|
@ -322,7 +335,7 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Loaded loaded = (Loaded) obj;
|
Loaded loaded = (Loaded) obj;
|
||||||
return m.areEqual(this.allGuilds, loaded.allGuilds) && m.areEqual(this.guildStickers, loaded.guildStickers) && m.areEqual(this.enabledStickerPacks, loaded.enabledStickerPacks) && m.areEqual(this.frequentlyUsedStickerIds, loaded.frequentlyUsedStickerIds) && m.areEqual(this.searchInputStringUpper, loaded.searchInputStringUpper) && this.stickerAnimationSettings == loaded.stickerAnimationSettings && m.areEqual(this.selectedPackId, loaded.selectedPackId) && m.areEqual(this.meUser, loaded.meUser) && this.isStickersSelectedTab == loaded.isStickersSelectedTab && m.areEqual(this.currentChannel, loaded.currentChannel) && this.currentChannelPermissions == loaded.currentChannelPermissions;
|
return m.areEqual(this.allGuilds, loaded.allGuilds) && m.areEqual(this.guildStickers, loaded.guildStickers) && m.areEqual(this.enabledStickerPacks, loaded.enabledStickerPacks) && m.areEqual(this.frequentlyUsedStickerIds, loaded.frequentlyUsedStickerIds) && m.areEqual(this.searchInputStringUpper, loaded.searchInputStringUpper) && this.stickerAnimationSettings == loaded.stickerAnimationSettings && m.areEqual(this.selectedCategoryId, loaded.selectedCategoryId) && m.areEqual(this.meUser, loaded.meUser) && this.isStickersSelectedTab == loaded.isStickersSelectedTab && m.areEqual(this.currentChannel, loaded.currentChannel) && this.currentChannelPermissions == loaded.currentChannelPermissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final LinkedHashMap<Long, Guild> getAllGuilds() {
|
public final LinkedHashMap<Long, Guild> getAllGuilds() {
|
||||||
|
@ -357,8 +370,8 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
return this.searchInputStringUpper;
|
return this.searchInputStringUpper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Long getSelectedPackId() {
|
public final Long getSelectedCategoryId() {
|
||||||
return this.selectedPackId;
|
return this.selectedCategoryId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final int getStickerAnimationSettings() {
|
public final int getStickerAnimationSettings() {
|
||||||
|
@ -377,7 +390,7 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
int hashCode4 = (hashCode3 + (list2 != null ? list2.hashCode() : 0)) * 31;
|
int hashCode4 = (hashCode3 + (list2 != null ? list2.hashCode() : 0)) * 31;
|
||||||
String str = this.searchInputStringUpper;
|
String str = this.searchInputStringUpper;
|
||||||
int hashCode5 = (((hashCode4 + (str != null ? str.hashCode() : 0)) * 31) + this.stickerAnimationSettings) * 31;
|
int hashCode5 = (((hashCode4 + (str != null ? str.hashCode() : 0)) * 31) + this.stickerAnimationSettings) * 31;
|
||||||
Long l = this.selectedPackId;
|
Long l = this.selectedCategoryId;
|
||||||
int hashCode6 = (hashCode5 + (l != null ? l.hashCode() : 0)) * 31;
|
int hashCode6 = (hashCode5 + (l != null ? l.hashCode() : 0)) * 31;
|
||||||
MeUser meUser = this.meUser;
|
MeUser meUser = this.meUser;
|
||||||
int hashCode7 = (hashCode6 + (meUser != null ? meUser.hashCode() : 0)) * 31;
|
int hashCode7 = (hashCode6 + (meUser != null ? meUser.hashCode() : 0)) * 31;
|
||||||
|
@ -413,8 +426,8 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
L.append(this.searchInputStringUpper);
|
L.append(this.searchInputStringUpper);
|
||||||
L.append(", stickerAnimationSettings=");
|
L.append(", stickerAnimationSettings=");
|
||||||
L.append(this.stickerAnimationSettings);
|
L.append(this.stickerAnimationSettings);
|
||||||
L.append(", selectedPackId=");
|
L.append(", selectedCategoryId=");
|
||||||
L.append(this.selectedPackId);
|
L.append(this.selectedCategoryId);
|
||||||
L.append(", meUser=");
|
L.append(", meUser=");
|
||||||
L.append(this.meUser);
|
L.append(this.meUser);
|
||||||
L.append(", isStickersSelectedTab=");
|
L.append(", isStickersSelectedTab=");
|
||||||
|
@ -722,7 +735,7 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
public StickerPickerViewModel(BehaviorSubject<String> behaviorSubject, BehaviorSubject<Long> behaviorSubject2, Locale locale, MessageManager messageManager, StoreStickers storeStickers, long j, StoreChannels storeChannels, StoreChannelsSelected storeChannelsSelected, StorePermissions storePermissions, StoreUser storeUser, Observable<StoreState> observable) {
|
public StickerPickerViewModel(BehaviorSubject<String> behaviorSubject, BehaviorSubject<Long> behaviorSubject2, Locale locale, MessageManager messageManager, StoreStickers storeStickers, long j, StoreChannels storeChannels, StoreChannelsSelected storeChannelsSelected, StorePermissions storePermissions, StoreUser storeUser, Observable<StoreState> observable) {
|
||||||
super(null);
|
super(null);
|
||||||
m.checkNotNullParameter(behaviorSubject, "searchSubject");
|
m.checkNotNullParameter(behaviorSubject, "searchSubject");
|
||||||
m.checkNotNullParameter(behaviorSubject2, "selectedPackIdSubject");
|
m.checkNotNullParameter(behaviorSubject2, "selectedCategoryIdSubject");
|
||||||
m.checkNotNullParameter(locale, "locale");
|
m.checkNotNullParameter(locale, "locale");
|
||||||
m.checkNotNullParameter(messageManager, "messageManager");
|
m.checkNotNullParameter(messageManager, "messageManager");
|
||||||
m.checkNotNullParameter(storeStickers, "stickersStore");
|
m.checkNotNullParameter(storeStickers, "stickersStore");
|
||||||
|
@ -732,7 +745,7 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
m.checkNotNullParameter(storeUser, "userStore");
|
m.checkNotNullParameter(storeUser, "userStore");
|
||||||
m.checkNotNullParameter(observable, "storeStateObservable");
|
m.checkNotNullParameter(observable, "storeStateObservable");
|
||||||
this.searchSubject = behaviorSubject;
|
this.searchSubject = behaviorSubject;
|
||||||
this.selectedPackIdSubject = behaviorSubject2;
|
this.selectedCategoryIdSubject = behaviorSubject2;
|
||||||
this.locale = locale;
|
this.locale = locale;
|
||||||
this.messageManager = messageManager;
|
this.messageManager = messageManager;
|
||||||
this.stickersStore = storeStickers;
|
this.stickersStore = storeStickers;
|
||||||
|
@ -774,9 +787,10 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
stickerPickerViewModel.handleStoreState(storeState);
|
stickerPickerViewModel.handleStoreState(storeState);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* JADX WARNING: Removed duplicated region for block: B:34:0x00ac */
|
/* JADX WARNING: Removed duplicated region for block: B:34:0x00b1 */
|
||||||
/* JADX WARNING: Removed duplicated region for block: B:86:0x00b9 A[SYNTHETIC] */
|
/* JADX WARNING: Removed duplicated region for block: B:37:0x00c0 */
|
||||||
/* JADX WARNING: Removed duplicated region for block: B:89:0x0064 A[SYNTHETIC] */
|
/* JADX WARNING: Removed duplicated region for block: B:90:0x00d0 A[SYNTHETIC] */
|
||||||
|
/* JADX WARNING: Removed duplicated region for block: B:95:0x0069 A[SYNTHETIC] */
|
||||||
private final List<StickerCategoryItem> createEnabledCategoryItems(StoreState.Loaded loaded, List<? extends MGRecyclerDataPayload> list, List<Sticker> list2) {
|
private final List<StickerCategoryItem> createEnabledCategoryItems(StoreState.Loaded loaded, List<? extends MGRecyclerDataPayload> list, List<Sticker> list2) {
|
||||||
int i;
|
int i;
|
||||||
Collection<Sticker> values;
|
Collection<Sticker> values;
|
||||||
|
@ -784,8 +798,9 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
boolean z2;
|
boolean z2;
|
||||||
boolean z3;
|
boolean z3;
|
||||||
ArrayList arrayList = new ArrayList();
|
ArrayList arrayList = new ArrayList();
|
||||||
Long selectedPackId = loaded.getSelectedPackId();
|
Long selectedCategoryId = loaded.getSelectedCategoryId();
|
||||||
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
LinkedHashSet linkedHashSet = new LinkedHashSet();
|
||||||
|
LinkedHashSet linkedHashSet2 = new LinkedHashSet();
|
||||||
if ((loaded.getMeUser().getPremiumTier() != PremiumTier.TIER_2 && loaded.getGuildStickers().isEmpty()) || loaded.getEnabledStickerPacks().isEmpty()) {
|
if ((loaded.getMeUser().getPremiumTier() != PremiumTier.TIER_2 && loaded.getGuildStickers().isEmpty()) || loaded.getEnabledStickerPacks().isEmpty()) {
|
||||||
return n.emptyList();
|
return n.emptyList();
|
||||||
}
|
}
|
||||||
|
@ -819,16 +834,23 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
if (z2) {
|
if (z2) {
|
||||||
linkedHashSet.add(-1L);
|
linkedHashSet.add(-1L);
|
||||||
}
|
}
|
||||||
if (sticker.i() == null) {
|
if (sticker.i() != null) {
|
||||||
Long i2 = sticker.i();
|
Long i2 = sticker.i();
|
||||||
Objects.requireNonNull(i2, "null cannot be cast to non-null type kotlin.Long");
|
Objects.requireNonNull(i2, "null cannot be cast to non-null type kotlin.Long");
|
||||||
linkedHashSet.add(i2);
|
linkedHashSet.add(i2);
|
||||||
}
|
}
|
||||||
|
if (sticker.g() == null) {
|
||||||
|
Long g = sticker.g();
|
||||||
|
Objects.requireNonNull(g, "null cannot be cast to non-null type kotlin.Long");
|
||||||
|
linkedHashSet2.add(g);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
z2 = false;
|
z2 = false;
|
||||||
if (z2) {
|
if (z2) {
|
||||||
}
|
}
|
||||||
if (sticker.i() == null) {
|
if (sticker.i() != null) {
|
||||||
|
}
|
||||||
|
if (sticker.g() == null) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -836,7 +858,7 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
if (!list2.isEmpty()) {
|
if (!list2.isEmpty()) {
|
||||||
i = list2.size() + 1 + 0;
|
i = list2.size() + 1 + 0;
|
||||||
if (linkedHashSet.contains(-1L)) {
|
if (linkedHashSet.contains(-1L)) {
|
||||||
arrayList.add(new StickerCategoryItem.RecentItem(selectedPackId != null && selectedPackId.longValue() == -1, new Pair(0, Integer.valueOf(i))));
|
arrayList.add(new StickerCategoryItem.RecentItem(selectedCategoryId != null && selectedCategoryId.longValue() == -1, new Pair(0, Integer.valueOf(i))));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -846,15 +868,17 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
Guild value = entry.getValue();
|
Guild value = entry.getValue();
|
||||||
Map<Long, Sticker> map = loaded.getGuildStickers().get(Long.valueOf(longValue));
|
Map<Long, Sticker> map = loaded.getGuildStickers().get(Long.valueOf(longValue));
|
||||||
if (!(map == null || (values = map.values()) == null || (list3 = u.toList(values)) == null)) {
|
if (!(map == null || (values = map.values()) == null || (list3 = u.toList(values)) == null)) {
|
||||||
boolean z4 = selectedPackId != null && selectedPackId.longValue() == value.getId();
|
boolean z4 = selectedCategoryId != null && selectedCategoryId.longValue() == value.getId();
|
||||||
int size = list3.size() + 1 + i;
|
int size = list3.size() + 1 + i;
|
||||||
|
if (linkedHashSet2.contains(Long.valueOf(longValue))) {
|
||||||
arrayList.add(new StickerCategoryItem.GuildItem(value, list3, new Pair(Integer.valueOf(i), Integer.valueOf(size)), z4));
|
arrayList.add(new StickerCategoryItem.GuildItem(value, list3, new Pair(Integer.valueOf(i), Integer.valueOf(size)), z4));
|
||||||
|
}
|
||||||
i = size;
|
i = size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (loaded.getMeUser().getPremiumTier() == PremiumTier.TIER_2) {
|
if (loaded.getMeUser().getPremiumTier() == PremiumTier.TIER_2) {
|
||||||
for (ModelStickerPack modelStickerPack2 : loaded.getEnabledStickerPacks()) {
|
for (ModelStickerPack modelStickerPack2 : loaded.getEnabledStickerPacks()) {
|
||||||
boolean z5 = selectedPackId != null && selectedPackId.longValue() == modelStickerPack2.getId();
|
boolean z5 = selectedCategoryId != null && selectedCategoryId.longValue() == modelStickerPack2.getId();
|
||||||
int size2 = modelStickerPack2.getStickers().size() + 1 + i;
|
int size2 = modelStickerPack2.getStickers().size() + 1 + i;
|
||||||
if (linkedHashSet.contains(Long.valueOf(modelStickerPack2.getId()))) {
|
if (linkedHashSet.contains(Long.valueOf(modelStickerPack2.getId()))) {
|
||||||
arrayList.add(new StickerCategoryItem.PackItem(modelStickerPack2, new Pair(Integer.valueOf(i), Integer.valueOf(size2)), z5));
|
arrayList.add(new StickerCategoryItem.PackItem(modelStickerPack2, new Pair(Integer.valueOf(i), Integer.valueOf(size2)), z5));
|
||||||
|
@ -885,13 +909,17 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
private final void handleStoreState(StoreState storeState) {
|
private final void handleStoreState(StoreState storeState) {
|
||||||
if (storeState instanceof StoreState.Loaded) {
|
if (storeState instanceof StoreState.Loaded) {
|
||||||
StoreState.Loaded loaded = (StoreState.Loaded) storeState;
|
StoreState.Loaded loaded = (StoreState.Loaded) storeState;
|
||||||
Long valueOf = loaded.getSelectedPackId() == null ? Long.valueOf(this.initialStickerPackId) : null;
|
Long valueOf = loaded.getSelectedCategoryId() == null ? Long.valueOf(this.initialStickerPackId) : null;
|
||||||
handleStoreStateForEnabledPage(loaded);
|
handleStoreStateForEnabledPage(loaded);
|
||||||
scrollToPackId(valueOf);
|
scrollToPackId(valueOf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* JADX WARNING: Removed duplicated region for block: B:24:0x00e7 */
|
||||||
|
/* JADX WARNING: Removed duplicated region for block: B:35:0x0151 */
|
||||||
|
/* JADX WARNING: Removed duplicated region for block: B:46:0x0203 */
|
||||||
private final void handleStoreStateForEnabledPage(StoreState.Loaded loaded) {
|
private final void handleStoreStateForEnabledPage(StoreState.Loaded loaded) {
|
||||||
|
List<StickerCategoryItem> createEnabledCategoryItems;
|
||||||
Collection<Sticker> values;
|
Collection<Sticker> values;
|
||||||
List list;
|
List list;
|
||||||
Map<Long, Sticker> allStickersById = getAllStickersById(loaded);
|
Map<Long, Sticker> allStickersById = getAllStickersById(loaded);
|
||||||
|
@ -911,8 +939,9 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ArrayList arrayList2 = new ArrayList();
|
ArrayList arrayList2 = new ArrayList();
|
||||||
|
boolean z2 = true;
|
||||||
int i = 2;
|
int i = 2;
|
||||||
boolean z2 = false;
|
boolean z3 = false;
|
||||||
if (!arrayList.isEmpty()) {
|
if (!arrayList.isEmpty()) {
|
||||||
for (Sticker sticker2 : arrayList) {
|
for (Sticker sticker2 : arrayList) {
|
||||||
String h = sticker2.h();
|
String h = sticker2.h();
|
||||||
|
@ -920,31 +949,29 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
Objects.requireNonNull(h, "null cannot be cast to non-null type java.lang.String");
|
Objects.requireNonNull(h, "null cannot be cast to non-null type java.lang.String");
|
||||||
String lowerCase2 = h.toLowerCase(locale2);
|
String lowerCase2 = h.toLowerCase(locale2);
|
||||||
m.checkNotNullExpressionValue(lowerCase2, "(this as java.lang.String).toLowerCase(locale)");
|
m.checkNotNullExpressionValue(lowerCase2, "(this as java.lang.String).toLowerCase(locale)");
|
||||||
if (!w.contains$default(lowerCase2, lowerCase, z2, i, (Object) null)) {
|
if (!w.contains$default(lowerCase2, lowerCase, z3, i, (Object) null)) {
|
||||||
String j = sticker2.j();
|
String j = sticker2.j();
|
||||||
Locale locale3 = this.locale;
|
Locale locale3 = this.locale;
|
||||||
Objects.requireNonNull(j, "null cannot be cast to non-null type java.lang.String");
|
Objects.requireNonNull(j, "null cannot be cast to non-null type java.lang.String");
|
||||||
String lowerCase3 = j.toLowerCase(locale3);
|
String lowerCase3 = j.toLowerCase(locale3);
|
||||||
m.checkNotNullExpressionValue(lowerCase3, "(this as java.lang.String).toLowerCase(locale)");
|
m.checkNotNullExpressionValue(lowerCase3, "(this as java.lang.String).toLowerCase(locale)");
|
||||||
if (!w.contains$default(lowerCase3, lowerCase, z2, i, (Object) null)) {
|
if (!w.contains$default(lowerCase3, lowerCase, z3, i, (Object) null)) {
|
||||||
z2 = false;
|
|
||||||
i = 2;
|
i = 2;
|
||||||
|
z3 = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arrayList2.add(new StickerItem(sticker2, stickerAnimationSettings, StickerItem.Mode.OWNED, StickerUtils.INSTANCE.getStickerSendability(sticker2, loaded.getMeUser(), loaded.getCurrentChannel(), Long.valueOf(loaded.getCurrentChannelPermissions()))));
|
arrayList2.add(new StickerItem(sticker2, stickerAnimationSettings, StickerItem.Mode.OWNED, StickerUtils.INSTANCE.getStickerSendability(sticker2, loaded.getMeUser(), loaded.getCurrentChannel(), Long.valueOf(loaded.getCurrentChannelPermissions()))));
|
||||||
z2 = false;
|
|
||||||
i = 2;
|
i = 2;
|
||||||
|
z3 = false;
|
||||||
}
|
}
|
||||||
if (!arrayList2.isEmpty()) {
|
if (!arrayList2.isEmpty()) {
|
||||||
arrayList2.add(0, new HeaderItem(HeaderType.Recent.INSTANCE));
|
arrayList2.add(0, new HeaderItem(HeaderType.Recent.INSTANCE));
|
||||||
}
|
|
||||||
}
|
|
||||||
for (Map.Entry<Long, Guild> entry : loaded.getAllGuilds().entrySet()) {
|
for (Map.Entry<Long, Guild> entry : loaded.getAllGuilds().entrySet()) {
|
||||||
long longValue = entry.getKey().longValue();
|
long longValue = entry.getKey().longValue();
|
||||||
Guild value = entry.getValue();
|
Guild value = entry.getValue();
|
||||||
Map<Long, Sticker> map = loaded.getGuildStickers().get(Long.valueOf(longValue));
|
Map<Long, Sticker> map = loaded.getGuildStickers().get(Long.valueOf(longValue));
|
||||||
if (map != null && (values = map.values()) != null && (list = u.toList(values)) != null) {
|
if (map != null && (values = map.values()) != null && (list = u.toList(values)) != null) {
|
||||||
arrayList2.addAll(Companion.access$buildGuildStickersListItems(Companion, list, value, stickerAnimationSettings, loaded.getMeUser(), loaded.getCurrentChannel(), loaded.getCurrentChannelPermissions()));
|
arrayList2.addAll(Companion.access$buildGuildStickersListItems(Companion, list, value, stickerAnimationSettings, lowerCase, loaded.getMeUser(), this.locale, loaded.getCurrentChannel(), loaded.getCurrentChannelPermissions()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (loaded.getMeUser().getPremiumTier() == PremiumTier.TIER_2) {
|
if (loaded.getMeUser().getPremiumTier() == PremiumTier.TIER_2) {
|
||||||
|
@ -952,18 +979,33 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
arrayList2.addAll(Companion.access$buildStickerListItems(Companion, modelStickerPack, lowerCase, stickerAnimationSettings, this.locale, loaded.getMeUser()));
|
arrayList2.addAll(Companion.access$buildStickerListItems(Companion, modelStickerPack, lowerCase, stickerAnimationSettings, this.locale, loaded.getMeUser()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<StickerCategoryItem> createEnabledCategoryItems = createEnabledCategoryItems(loaded, arrayList2, arrayList);
|
createEnabledCategoryItems = createEnabledCategoryItems(loaded, arrayList2, arrayList);
|
||||||
if (loaded.getMeUser().getPremiumTier() == PremiumTier.TIER_2 || !loaded.getGuildStickers().isEmpty()) {
|
if (loaded.getMeUser().getPremiumTier() != PremiumTier.TIER_2 || !loaded.getGuildStickers().isEmpty()) {
|
||||||
if (arrayList2.isEmpty()) {
|
if (arrayList2.isEmpty()) {
|
||||||
if (lowerCase.length() > 0) {
|
if (lowerCase.length() <= 0) {
|
||||||
|
z2 = false;
|
||||||
|
}
|
||||||
|
if (z2) {
|
||||||
updateViewState(new ViewState.EmptySearchResults(loaded.getSearchInputStringUpper(), createEnabledCategoryItems));
|
updateViewState(new ViewState.EmptySearchResults(loaded.getSearchInputStringUpper(), createEnabledCategoryItems));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateViewState(new ViewState.Stickers(loaded.getSearchInputStringUpper(), arrayList2, createEnabledCategoryItems, loaded.isStickersSelectedTab()));
|
updateViewState(new ViewState.Stickers(loaded.getSearchInputStringUpper(), arrayList2, createEnabledCategoryItems, loaded.isStickersSelectedTab()));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
updateViewState(new ViewState.Phase1RolloutNotPremium(n.listOfNotNull((Object[]) new Sticker[]{this.stickersStore.getStickers().get(781323769960202280L), this.stickersStore.getStickers().get(809209266556764241L), this.stickersStore.getStickers().get(818597810047680532L), this.stickersStore.getStickers().get(819129296374595614L)})));
|
updateViewState(new ViewState.Phase1RolloutNotPremium(n.listOfNotNull((Object[]) new Sticker[]{this.stickersStore.getStickers().get(781323769960202280L), this.stickersStore.getStickers().get(809209266556764241L), this.stickersStore.getStickers().get(818597810047680532L), this.stickersStore.getStickers().get(819129296374595614L)})));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (r18.hasNext()) {
|
||||||
|
}
|
||||||
|
if (loaded.getMeUser().getPremiumTier() == PremiumTier.TIER_2) {
|
||||||
|
}
|
||||||
|
createEnabledCategoryItems = createEnabledCategoryItems(loaded, arrayList2, arrayList);
|
||||||
|
if (loaded.getMeUser().getPremiumTier() != PremiumTier.TIER_2) {
|
||||||
|
}
|
||||||
|
if (arrayList2.isEmpty()) {
|
||||||
|
}
|
||||||
|
updateViewState(new ViewState.Stickers(loaded.getSearchInputStringUpper(), arrayList2, createEnabledCategoryItems, loaded.isStickersSelectedTab()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Observable<Event> observeEvents() {
|
public final Observable<Event> observeEvents() {
|
||||||
|
@ -1021,8 +1063,8 @@ public class StickerPickerViewModel extends AppViewModel<ViewState> {
|
||||||
this.searchSubject.onNext(str);
|
this.searchSubject.onNext(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setSelectedPackId(long j) {
|
public final void setSelectedCategoryId(long j) {
|
||||||
this.selectedPackIdSubject.onNext(Long.valueOf(j));
|
this.selectedCategoryIdSubject.onNext(Long.valueOf(j));
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setStickerCountToDisplayForStore(int i) {
|
public final void setStickerCountToDisplayForStore(int i) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ public final class WidgetStickerPicker$setupForInlineSearchAndScroll$$inlined$do
|
||||||
m.checkParameterIsNotNull(view, "view");
|
m.checkParameterIsNotNull(view, "view");
|
||||||
view.removeOnLayoutChangeListener(this);
|
view.removeOnLayoutChangeListener(this);
|
||||||
WidgetStickerPicker.access$getViewModel$p(this.this$0).setSearchText(this.$searchText$inlined);
|
WidgetStickerPicker.access$getViewModel$p(this.this$0).setSearchText(this.$searchText$inlined);
|
||||||
WidgetStickerPicker.access$getViewModel$p(this.this$0).setSelectedPackId(this.$packId$inlined);
|
WidgetStickerPicker.access$getViewModel$p(this.this$0).setSelectedCategoryId(this.$packId$inlined);
|
||||||
RecyclerView recyclerView = WidgetStickerPicker.access$getBinding$p(this.this$0).k;
|
RecyclerView recyclerView = WidgetStickerPicker.access$getBinding$p(this.this$0).k;
|
||||||
m.checkNotNullExpressionValue(recyclerView, "binding.chatInputStickerPickerRecycler");
|
m.checkNotNullExpressionValue(recyclerView, "binding.chatInputStickerPickerRecycler");
|
||||||
if (!ViewCompat.isLaidOut(recyclerView) || recyclerView.isLayoutRequested()) {
|
if (!ViewCompat.isLaidOut(recyclerView) || recyclerView.isLayoutRequested()) {
|
||||||
|
|
|
@ -377,7 +377,24 @@ public final class WidgetStickerPicker extends AppFragment implements c {
|
||||||
}
|
}
|
||||||
this.autoscrollToPackId = null;
|
this.autoscrollToPackId = null;
|
||||||
if (!stickerCategoryItem.isSelected()) {
|
if (!stickerCategoryItem.isSelected()) {
|
||||||
selectPackById(((StickerCategoryItem.PackItem) stickerCategoryItem).getPack().getId());
|
selectCategoryById(((StickerCategoryItem.PackItem) stickerCategoryItem).getPack().getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (stickerCategoryItem instanceof StickerCategoryItem.GuildItem) {
|
||||||
|
StickerCategoryItem.GuildItem guildItem = (StickerCategoryItem.GuildItem) stickerCategoryItem;
|
||||||
|
Pair<Integer, Integer> categoryRange2 = guildItem.getCategoryRange();
|
||||||
|
int intValue3 = categoryRange2.getFirst().intValue();
|
||||||
|
int intValue4 = categoryRange2.getSecond().intValue();
|
||||||
|
if (intValue3 <= i && intValue4 > i) {
|
||||||
|
Long l2 = this.autoscrollToPackId;
|
||||||
|
if (l2 != null) {
|
||||||
|
long id3 = guildItem.getGuild().getId();
|
||||||
|
if (l2 != null && l2.longValue() == id3) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.autoscrollToPackId = null;
|
||||||
|
if (!stickerCategoryItem.isSelected()) {
|
||||||
|
selectCategoryById(((StickerCategoryItem.GuildItem) stickerCategoryItem).getGuild().getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -421,7 +438,7 @@ public final class WidgetStickerPicker extends AppFragment implements c {
|
||||||
private final void onGuildClicked(StickerCategoryItem.GuildItem guildItem) {
|
private final void onGuildClicked(StickerCategoryItem.GuildItem guildItem) {
|
||||||
AnalyticsTracker.INSTANCE.guildCategorySelected(guildItem.getGuild().getId());
|
AnalyticsTracker.INSTANCE.guildCategorySelected(guildItem.getGuild().getId());
|
||||||
this.autoscrollToPackId = Long.valueOf(guildItem.getGuild().getId());
|
this.autoscrollToPackId = Long.valueOf(guildItem.getGuild().getId());
|
||||||
selectPackById(guildItem.getGuild().getId());
|
selectCategoryById(guildItem.getGuild().getId());
|
||||||
Pair<Integer, Integer> categoryRange = guildItem.getCategoryRange();
|
Pair<Integer, Integer> categoryRange = guildItem.getCategoryRange();
|
||||||
Observable<T> q = new j(Unit.a).q(200, TimeUnit.MILLISECONDS);
|
Observable<T> q = new j(Unit.a).q(200, TimeUnit.MILLISECONDS);
|
||||||
m.checkNotNullExpressionValue(q, "Observable.just(Unit)\n …0, TimeUnit.MILLISECONDS)");
|
m.checkNotNullExpressionValue(q, "Observable.just(Unit)\n …0, TimeUnit.MILLISECONDS)");
|
||||||
|
@ -431,7 +448,7 @@ public final class WidgetStickerPicker extends AppFragment implements c {
|
||||||
private final void onPackClicked(StickerCategoryItem.PackItem packItem) {
|
private final void onPackClicked(StickerCategoryItem.PackItem packItem) {
|
||||||
AnalyticsTracker.INSTANCE.stickerPackCategorySelected(packItem.getPack().getId());
|
AnalyticsTracker.INSTANCE.stickerPackCategorySelected(packItem.getPack().getId());
|
||||||
this.autoscrollToPackId = Long.valueOf(packItem.getPack().getId());
|
this.autoscrollToPackId = Long.valueOf(packItem.getPack().getId());
|
||||||
selectPackById(packItem.getPack().getId());
|
selectCategoryById(packItem.getPack().getId());
|
||||||
Pair<Integer, Integer> categoryRange = packItem.getCategoryRange();
|
Pair<Integer, Integer> categoryRange = packItem.getCategoryRange();
|
||||||
Observable<T> q = new j(Unit.a).q(200, TimeUnit.MILLISECONDS);
|
Observable<T> q = new j(Unit.a).q(200, TimeUnit.MILLISECONDS);
|
||||||
m.checkNotNullExpressionValue(q, "Observable.just(Unit)\n …0, TimeUnit.MILLISECONDS)");
|
m.checkNotNullExpressionValue(q, "Observable.just(Unit)\n …0, TimeUnit.MILLISECONDS)");
|
||||||
|
@ -439,7 +456,7 @@ public final class WidgetStickerPicker extends AppFragment implements c {
|
||||||
}
|
}
|
||||||
|
|
||||||
private final void onRecentClicked() {
|
private final void onRecentClicked() {
|
||||||
selectPackById(-1);
|
selectCategoryById(-1);
|
||||||
WidgetStickerAdapter widgetStickerAdapter = this.stickerAdapter;
|
WidgetStickerAdapter widgetStickerAdapter = this.stickerAdapter;
|
||||||
if (widgetStickerAdapter == null) {
|
if (widgetStickerAdapter == null) {
|
||||||
m.throwUninitializedPropertyAccessException("stickerAdapter");
|
m.throwUninitializedPropertyAccessException("stickerAdapter");
|
||||||
|
@ -584,7 +601,7 @@ public final class WidgetStickerPicker extends AppFragment implements c {
|
||||||
scrollToTop();
|
scrollToTop();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
getViewModel().setSelectedPackId(-1);
|
getViewModel().setSelectedCategoryId(-1);
|
||||||
clearSearchInput();
|
clearSearchInput();
|
||||||
} catch (Exception unused) {
|
} catch (Exception unused) {
|
||||||
}
|
}
|
||||||
|
@ -622,7 +639,7 @@ public final class WidgetStickerPicker extends AppFragment implements c {
|
||||||
getBinding().r.a(this, new WidgetStickerPicker$onViewBound$1(this));
|
getBinding().r.a(this, new WidgetStickerPicker$onViewBound$1(this));
|
||||||
Bundle arguments = getArguments();
|
Bundle arguments = getArguments();
|
||||||
Long valueOf = arguments != null ? Long.valueOf(arguments.getLong("com.discord.intent.EXTRA_STICKER_PACK_ID")) : null;
|
Long valueOf = arguments != null ? Long.valueOf(arguments.getLong("com.discord.intent.EXTRA_STICKER_PACK_ID")) : null;
|
||||||
getViewModel().setSelectedPackId(valueOf != null ? valueOf.longValue() : -1);
|
getViewModel().setSelectedCategoryId(valueOf != null ? valueOf.longValue() : -1);
|
||||||
RecyclerView recyclerView = getBinding().p;
|
RecyclerView recyclerView = getBinding().p;
|
||||||
m.checkNotNullExpressionValue(recyclerView, "binding.stickerPickerCategoryRecycler");
|
m.checkNotNullExpressionValue(recyclerView, "binding.stickerPickerCategoryRecycler");
|
||||||
recyclerView.setLayoutParams(new ConstraintLayout.LayoutParams(-1, -1));
|
recyclerView.setLayoutParams(new ConstraintLayout.LayoutParams(-1, -1));
|
||||||
|
@ -656,8 +673,8 @@ public final class WidgetStickerPicker extends AppFragment implements c {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void selectPackById(long j) {
|
public final void selectCategoryById(long j) {
|
||||||
getViewModel().setSelectedPackId(j);
|
getViewModel().setSelectedCategoryId(j);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setListener(StickerPickerListener stickerPickerListener) {
|
public final void setListener(StickerPickerListener stickerPickerListener) {
|
||||||
|
@ -686,7 +703,7 @@ public final class WidgetStickerPicker extends AppFragment implements c {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
access$getViewModel$p(this).setSearchText(str);
|
access$getViewModel$p(this).setSearchText(str);
|
||||||
access$getViewModel$p(this).setSelectedPackId(j);
|
access$getViewModel$p(this).setSelectedCategoryId(j);
|
||||||
RecyclerView recyclerView2 = access$getBinding$p(this).k;
|
RecyclerView recyclerView2 = access$getBinding$p(this).k;
|
||||||
m.checkNotNullExpressionValue(recyclerView2, "binding.chatInputStickerPickerRecycler");
|
m.checkNotNullExpressionValue(recyclerView2, "binding.chatInputStickerPickerRecycler");
|
||||||
if (!ViewCompat.isLaidOut(recyclerView2) || recyclerView2.isLayoutRequested()) {
|
if (!ViewCompat.isLaidOut(recyclerView2) || recyclerView2.isLayoutRequested()) {
|
||||||
|
|
|
@ -86,7 +86,7 @@ public final class WidgetStickerPickerSheet extends WidgetExpressionPickerSheet
|
||||||
if (widgetStickerPicker == null) {
|
if (widgetStickerPicker == null) {
|
||||||
m.throwUninitializedPropertyAccessException("stickerPickerFragment");
|
m.throwUninitializedPropertyAccessException("stickerPickerFragment");
|
||||||
}
|
}
|
||||||
widgetStickerPicker.selectPackById(-1);
|
widgetStickerPicker.selectCategoryById(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override // com.discord.widgets.chat.input.sticker.StickerPickerListener
|
@Override // com.discord.widgets.chat.input.sticker.StickerPickerListener
|
||||||
|
|
|
@ -266,16 +266,15 @@ public abstract class ChatListEntry implements MGRecyclerDataPayload {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final List<ChatListEntry> createStickerEntries(Message message) {
|
public final List<ChatListEntry> createStickerEntries(Message message) {
|
||||||
|
ArrayList arrayList;
|
||||||
m.checkNotNullParameter(message, "message");
|
m.checkNotNullParameter(message, "message");
|
||||||
ArrayList arrayList = null;
|
|
||||||
if (message.hasStickerItems()) {
|
|
||||||
List<StickerPartial> stickerItems = message.getStickerItems();
|
List<StickerPartial> stickerItems = message.getStickerItems();
|
||||||
if (stickerItems != null) {
|
if (!(stickerItems == null || stickerItems.isEmpty())) {
|
||||||
arrayList = new ArrayList(o.collectionSizeOrDefault(stickerItems, 10));
|
List<StickerPartial> stickerItems2 = message.getStickerItems();
|
||||||
for (StickerPartial stickerPartial : stickerItems) {
|
arrayList = new ArrayList(o.collectionSizeOrDefault(stickerItems2, 10));
|
||||||
|
for (StickerPartial stickerPartial : stickerItems2) {
|
||||||
arrayList.add(new StickerEntry(message, stickerPartial));
|
arrayList.add(new StickerEntry(message, stickerPartial));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
List<Sticker> stickers = message.getStickers();
|
List<Sticker> stickers = message.getStickers();
|
||||||
if (stickers != null) {
|
if (stickers != null) {
|
||||||
|
@ -283,6 +282,8 @@ public abstract class ChatListEntry implements MGRecyclerDataPayload {
|
||||||
for (Sticker sticker : stickers) {
|
for (Sticker sticker : stickers) {
|
||||||
arrayList.add(new StickerEntry(message, sticker));
|
arrayList.add(new StickerEntry(message, sticker));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
arrayList = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return arrayList != null ? arrayList : n.emptyList();
|
return arrayList != null ? arrayList : n.emptyList();
|
||||||
|
|
|
@ -100,7 +100,7 @@ public final class WidgetFatalCrash extends AppFragment {
|
||||||
textView2.setText(b.j(this, 2131887892, objArr2, null, 4));
|
textView2.setText(b.j(this, 2131887892, objArr2, null, 4));
|
||||||
TextView textView3 = getBinding().b;
|
TextView textView3 = getBinding().b;
|
||||||
m.checkNotNullExpressionValue(textView3, "binding.fatalCrashAppVersion");
|
m.checkNotNullExpressionValue(textView3, "binding.fatalCrashAppVersion");
|
||||||
textView3.setText(b.j(this, 2131887885, new Object[]{"82.11 - Beta"}, null, 4));
|
textView3.setText(b.j(this, 2131887885, new Object[]{"82.12 - Beta"}, null, 4));
|
||||||
TextView textView4 = getBinding().d;
|
TextView textView4 = getBinding().d;
|
||||||
m.checkNotNullExpressionValue(textView4, "binding.fatalCrashOsVersion");
|
m.checkNotNullExpressionValue(textView4, "binding.fatalCrashOsVersion");
|
||||||
textView4.setText(b.j(this, 2131887888, new Object[]{String.valueOf(Build.VERSION.SDK_INT)}, null, 4));
|
textView4.setText(b.j(this, 2131887888, new Object[]{String.valueOf(Build.VERSION.SDK_INT)}, null, 4));
|
||||||
|
|
|
@ -332,7 +332,7 @@ public final class WidgetSettings extends AppFragment implements OnTabSelectedLi
|
||||||
TextView textView = binding.f;
|
TextView textView = binding.f;
|
||||||
m.checkNotNullExpressionValue(textView, "appInfoHeader");
|
m.checkNotNullExpressionValue(textView, "appInfoHeader");
|
||||||
String string = getString(2131886360);
|
String string = getString(2131886360);
|
||||||
textView.setText(string + " - 82.11 - Beta (82111)");
|
textView.setText(string + " - 82.12 - Beta (82112)");
|
||||||
binding.f1921y.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$2(this));
|
binding.f1921y.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$2(this));
|
||||||
binding.u.setOnClickListener(WidgetSettings$onViewBound$1$4.INSTANCE);
|
binding.u.setOnClickListener(WidgetSettings$onViewBound$1$4.INSTANCE);
|
||||||
binding.q.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE);
|
binding.q.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center_vertical" android:background="@drawable/drawable_bg_corners_4dp" android:visibility="gone" android:layout_width="wrap_content" android:backgroundTint="?attr/colorBackgroundFloating" style="@style/res_2131952594_uikit_viewgroup_linearlayout_horizontal">
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center_vertical" android:background="@drawable/drawable_bg_corners_4dp" android:visibility="gone" android:layout_width="wrap_content" android:elevation="4dp" android:backgroundTint="?attr/colorBackgroundFloating" style="@style/res_2131952594_uikit_viewgroup_linearlayout_horizontal">
|
||||||
<com.discord.views.sticker.StickerView android:id="@+id/chat_input_suggested_sticker_1" android:paddingLeft="4dp" android:paddingTop="4dp" android:paddingBottom="4dp" android:layout_width="48dp" android:layout_height="48dp" android:layout_marginRight="8dp"/>
|
<com.discord.views.sticker.StickerView android:id="@+id/chat_input_suggested_sticker_1" android:paddingLeft="4dp" android:paddingTop="4dp" android:paddingBottom="4dp" android:layout_width="48dp" android:layout_height="48dp" android:layout_marginRight="8dp"/>
|
||||||
<com.discord.views.sticker.StickerView android:id="@+id/chat_input_suggested_sticker_2" android:paddingTop="4dp" android:paddingBottom="4dp" android:layout_width="48dp" android:layout_height="48dp" android:layout_marginRight="8dp"/>
|
<com.discord.views.sticker.StickerView android:id="@+id/chat_input_suggested_sticker_2" android:paddingTop="4dp" android:paddingBottom="4dp" android:layout_width="48dp" android:layout_height="48dp" android:layout_marginRight="8dp"/>
|
||||||
<com.discord.views.sticker.StickerView android:id="@+id/chat_input_suggested_sticker_3" android:paddingTop="4dp" android:paddingBottom="4dp" android:layout_width="48dp" android:layout_height="48dp" android:layout_marginRight="8dp"/>
|
<com.discord.views.sticker.StickerView android:id="@+id/chat_input_suggested_sticker_3" android:paddingTop="4dp" android:paddingBottom="4dp" android:layout_width="48dp" android:layout_height="48dp" android:layout_marginRight="8dp"/>
|
||||||
|
|
|
@ -1341,7 +1341,7 @@
|
||||||
<string name="color_picker_presets">Presets</string>
|
<string name="color_picker_presets">Presets</string>
|
||||||
<string name="color_picker_title">Select a color</string>
|
<string name="color_picker_title">Select a color</string>
|
||||||
<string name="color_picker_transparency">Transparency</string>
|
<string name="color_picker_transparency">Transparency</string>
|
||||||
<string name="res_2131887421_com_crashlytics_android_build_id">f31707f8e813423498473e05c7641788</string>
|
<string name="res_2131887421_com_crashlytics_android_build_id">68977ce749cf4ee9b4f8cf8a6a2edd06</string>
|
||||||
<string name="coming_soon">Coming Soon</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_header_item">Slash command application {applicationName}</string>
|
||||||
<string name="command_accessibility_desc_app_item">{applicationName} application</string>
|
<string name="command_accessibility_desc_app_item">{applicationName} application</string>
|
||||||
|
|
Loading…
Reference in a new issue