mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-04-28 20:19:35 +00:00
Update to 7.8.0 (2359)
This commit is contained in:
parent
a5939ccb34
commit
e8d88e56e4
1875 changed files with 110771 additions and 43473 deletions
|
|
@ -10,7 +10,6 @@ package org.telegram.messenger;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Base64;
|
||||
|
||||
|
|
@ -60,10 +59,6 @@ public class UserConfig extends BaseController {
|
|||
public boolean hasSecureData;
|
||||
public int loginTime;
|
||||
public TLRPC.TL_help_termsOfService unacceptedTermsOfService;
|
||||
public TLRPC.TL_help_appUpdate pendingAppUpdate;
|
||||
public int pendingAppUpdateBuildVersion;
|
||||
public long pendingAppUpdateInstallTime;
|
||||
public long lastUpdateCheckTime;
|
||||
public long autoDownloadConfigLoadTime;
|
||||
|
||||
public volatile byte[] savedPasswordHash;
|
||||
|
|
@ -188,25 +183,6 @@ public class UserConfig extends BaseController {
|
|||
editor.remove("terms");
|
||||
}
|
||||
|
||||
if (currentAccount == 0) {
|
||||
if (pendingAppUpdate != null) {
|
||||
try {
|
||||
SerializedData data = new SerializedData(pendingAppUpdate.getObjectSize());
|
||||
pendingAppUpdate.serializeToStream(data);
|
||||
String str = Base64.encodeToString(data.toByteArray(), Base64.DEFAULT);
|
||||
editor.putString("appUpdate", str);
|
||||
editor.putInt("appUpdateBuild", pendingAppUpdateBuildVersion);
|
||||
editor.putLong("appUpdateTime", pendingAppUpdateInstallTime);
|
||||
editor.putLong("appUpdateCheckTime", lastUpdateCheckTime);
|
||||
data.cleanup();
|
||||
} catch (Exception ignore) {
|
||||
|
||||
}
|
||||
} else {
|
||||
editor.remove("appUpdate");
|
||||
}
|
||||
}
|
||||
|
||||
SharedConfig.saveConfig();
|
||||
|
||||
if (tmpPassword != null) {
|
||||
|
|
@ -338,38 +314,6 @@ public class UserConfig extends BaseController {
|
|||
FileLog.e(e);
|
||||
}
|
||||
|
||||
if (currentAccount == 0) {
|
||||
lastUpdateCheckTime = preferences.getLong("appUpdateCheckTime", System.currentTimeMillis());
|
||||
try {
|
||||
String update = preferences.getString("appUpdate", null);
|
||||
if (update != null) {
|
||||
pendingAppUpdateBuildVersion = preferences.getInt("appUpdateBuild", BuildVars.BUILD_VERSION);
|
||||
pendingAppUpdateInstallTime = preferences.getLong("appUpdateTime", System.currentTimeMillis());
|
||||
byte[] arr = Base64.decode(update, Base64.DEFAULT);
|
||||
if (arr != null) {
|
||||
SerializedData data = new SerializedData(arr);
|
||||
pendingAppUpdate = (TLRPC.TL_help_appUpdate) TLRPC.help_AppUpdate.TLdeserialize(data, data.readInt32(false), false);
|
||||
data.cleanup();
|
||||
}
|
||||
}
|
||||
if (pendingAppUpdate != null) {
|
||||
long updateTime = 0;
|
||||
try {
|
||||
PackageInfo packageInfo = ApplicationLoader.applicationContext.getPackageManager().getPackageInfo(ApplicationLoader.applicationContext.getPackageName(), 0);
|
||||
updateTime = Math.max(packageInfo.lastUpdateTime, packageInfo.firstInstallTime);
|
||||
} catch (Exception e) {
|
||||
FileLog.e(e);
|
||||
}
|
||||
if (pendingAppUpdateBuildVersion != BuildVars.BUILD_VERSION || pendingAppUpdateInstallTime < updateTime) {
|
||||
pendingAppUpdate = null;
|
||||
AndroidUtilities.runOnUIThread(() -> saveConfig(false));
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
migrateOffsetId = preferences.getInt("6migrateOffsetId", 0);
|
||||
if (migrateOffsetId != -1) {
|
||||
migrateOffsetDate = preferences.getInt("6migrateOffsetDate", 0);
|
||||
|
|
@ -484,7 +428,6 @@ public class UserConfig extends BaseController {
|
|||
hasValidDialogLoadIds = true;
|
||||
unacceptedTermsOfService = null;
|
||||
filtersLoaded = false;
|
||||
pendingAppUpdate = null;
|
||||
hasSecureData = false;
|
||||
loginTime = (int) (System.currentTimeMillis() / 1000);
|
||||
lastContactsSyncTime = (int) (System.currentTimeMillis() / 1000) - 23 * 60 * 60;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue