mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-04-29 04:29:33 +00:00
update to 8.9.0
This commit is contained in:
parent
6cb1cdf898
commit
b1aa2020e5
3870 changed files with 26568 additions and 6357 deletions
|
|
@ -16,7 +16,11 @@ import android.util.Base64;
|
|||
import org.telegram.tgnet.SerializedData;
|
||||
import org.telegram.tgnet.TLRPC;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
public class UserConfig extends BaseController {
|
||||
|
||||
|
|
@ -61,6 +65,12 @@ 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 long lastUpdatedPremiumGiftsStickerPack;
|
||||
|
||||
public volatile byte[] savedPasswordHash;
|
||||
public volatile byte[] savedSaltedPassword;
|
||||
public volatile long savedPasswordTime;
|
||||
|
|
@ -145,6 +155,17 @@ 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);
|
||||
|
||||
editor.putInt("6migrateOffsetId", migrateOffsetId);
|
||||
if (migrateOffsetId != -1) {
|
||||
|
|
@ -280,6 +301,20 @@ 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);
|
||||
|
||||
try {
|
||||
String terms = preferences.getString("terms", null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue