update to 9.7.0 (3687)

This commit is contained in:
xaxtix 2023-07-21 00:15:36 +04:00
parent dfd74f809e
commit 65f01a70e7
650 changed files with 70078 additions and 7345 deletions

View file

@ -14,6 +14,8 @@ import android.os.SystemClock;
import android.util.Base64;
import android.util.LongSparseArray;
import com.google.android.exoplayer2.util.Log;
import org.telegram.tgnet.SerializedData;
import org.telegram.tgnet.TLRPC;
@ -66,9 +68,6 @@ public class UserConfig extends BaseController {
public TLRPC.TL_help_termsOfService unacceptedTermsOfService;
public long autoDownloadConfigLoadTime;
public List<String> awaitBillingProductIds = new ArrayList<>();
public TLRPC.InputStorePaymentPurpose billingPaymentPurpose;
public String premiumGiftsStickerPack;
public String genericAnimationsStickerPack;
public String defaultTopicIcons;
@ -167,15 +166,6 @@ public class UserConfig extends BaseController {
editor.putInt("sharingMyLocationUntil", sharingMyLocationUntil);
editor.putInt("lastMyLocationShareTime", lastMyLocationShareTime);
editor.putBoolean("filtersLoaded", filtersLoaded);
editor.putStringSet("awaitBillingProductIds", new HashSet<>(awaitBillingProductIds));
if (billingPaymentPurpose != null) {
SerializedData data = new SerializedData(billingPaymentPurpose.getObjectSize());
billingPaymentPurpose.serializeToStream(data);
editor.putString("billingPaymentPurpose", Base64.encodeToString(data.toByteArray(), Base64.DEFAULT));
data.cleanup();
} else {
editor.remove("billingPaymentPurpose");
}
editor.putString("premiumGiftsStickerPack", premiumGiftsStickerPack);
editor.putLong("lastUpdatedPremiumGiftsStickerPack", lastUpdatedPremiumGiftsStickerPack);
@ -228,7 +218,7 @@ public class UserConfig extends BaseController {
editor.remove("user");
}
editor.commit();
editor.apply();
} catch (Exception e) {
FileLog.e(e);
}
@ -318,18 +308,6 @@ public class UserConfig extends BaseController {
sharingMyLocationUntil = preferences.getInt("sharingMyLocationUntil", 0);
lastMyLocationShareTime = preferences.getInt("lastMyLocationShareTime", 0);
filtersLoaded = preferences.getBoolean("filtersLoaded", false);
awaitBillingProductIds = new ArrayList<>(preferences.getStringSet("awaitBillingProductIds", Collections.emptySet()));
if (preferences.contains("billingPaymentPurpose")) {
String purpose = preferences.getString("billingPaymentPurpose", null);
if (purpose != null) {
byte[] arr = Base64.decode(purpose, Base64.DEFAULT);
if (arr != null) {
SerializedData data = new SerializedData();
billingPaymentPurpose = TLRPC.InputStorePaymentPurpose.TLdeserialize(data, data.readInt32(false), false);
data.cleanup();
}
}
}
premiumGiftsStickerPack = preferences.getString("premiumGiftsStickerPack", null);
lastUpdatedPremiumGiftsStickerPack = preferences.getLong("lastUpdatedPremiumGiftsStickerPack", 0);