mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-04-29 04:29:33 +00:00
Update to 3.2.2
This commit is contained in:
parent
906746d573
commit
6bb7547f50
1086 changed files with 270457 additions and 35830 deletions
|
|
@ -12,7 +12,8 @@ import android.content.Context;
|
|||
import android.content.SharedPreferences;
|
||||
import android.util.Base64;
|
||||
|
||||
import org.telegram.android.MessagesStorage;
|
||||
import org.telegram.tgnet.SerializedData;
|
||||
import org.telegram.tgnet.TLRPC;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
|
@ -20,7 +21,6 @@ public class UserConfig {
|
|||
|
||||
private static TLRPC.User currentUser;
|
||||
public static boolean registeredForPush = false;
|
||||
public static boolean registeredForInternalPush = false;
|
||||
public static String pushString = "";
|
||||
public static int lastSendMessageId = -210000;
|
||||
public static int lastLocalId = -210000;
|
||||
|
|
@ -40,6 +40,7 @@ public class UserConfig {
|
|||
public static boolean isWaitingForPasscodeEnter = false;
|
||||
public static int lastUpdateVersion;
|
||||
public static int lastContactsSyncTime;
|
||||
public static boolean channelsLoaded = false;
|
||||
|
||||
public static int getNewMessageId() {
|
||||
int id;
|
||||
|
|
@ -68,7 +69,6 @@ public class UserConfig {
|
|||
editor.putBoolean("saveIncomingPhotos", saveIncomingPhotos);
|
||||
editor.putInt("contactsVersion", contactsVersion);
|
||||
editor.putInt("lastBroadcastId", lastBroadcastId);
|
||||
editor.putBoolean("registeredForInternalPush", registeredForInternalPush);
|
||||
editor.putBoolean("blockedUsersLoaded", blockedUsersLoaded);
|
||||
editor.putString("passcodeHash1", passcodeHash);
|
||||
editor.putString("passcodeSalt", passcodeSalt.length > 0 ? Base64.encodeToString(passcodeSalt, Base64.DEFAULT) : "");
|
||||
|
|
@ -78,6 +78,7 @@ public class UserConfig {
|
|||
editor.putInt("lastPauseTime", lastPauseTime);
|
||||
editor.putInt("lastUpdateVersion", lastUpdateVersion);
|
||||
editor.putInt("lastContactsSyncTime", lastContactsSyncTime);
|
||||
editor.putBoolean("channelsLoaded", channelsLoaded);
|
||||
|
||||
if (currentUser != null) {
|
||||
if (withFile) {
|
||||
|
|
@ -200,7 +201,6 @@ public class UserConfig {
|
|||
saveIncomingPhotos = preferences.getBoolean("saveIncomingPhotos", false);
|
||||
contactsVersion = preferences.getInt("contactsVersion", 0);
|
||||
lastBroadcastId = preferences.getInt("lastBroadcastId", -1);
|
||||
registeredForInternalPush = preferences.getBoolean("registeredForInternalPush", false);
|
||||
blockedUsersLoaded = preferences.getBoolean("blockedUsersLoaded", false);
|
||||
passcodeHash = preferences.getString("passcodeHash1", "");
|
||||
appLocked = preferences.getBoolean("appLocked", false);
|
||||
|
|
@ -209,6 +209,7 @@ public class UserConfig {
|
|||
lastPauseTime = preferences.getInt("lastPauseTime", 0);
|
||||
lastUpdateVersion = preferences.getInt("lastUpdateVersion", 511);
|
||||
lastContactsSyncTime = preferences.getInt("lastContactsSyncTime", (int) (System.currentTimeMillis() / 1000) - 23 * 60 * 60);
|
||||
channelsLoaded = preferences.getBoolean("channelsLoaded", false);
|
||||
String user = preferences.getString("user", null);
|
||||
if (user != null) {
|
||||
byte[] userBytes = Base64.decode(user, Base64.DEFAULT);
|
||||
|
|
@ -265,7 +266,6 @@ public class UserConfig {
|
|||
|
||||
public static void clearConfig() {
|
||||
currentUser = null;
|
||||
registeredForInternalPush = false;
|
||||
registeredForPush = false;
|
||||
contactsHash = "";
|
||||
importHash = "";
|
||||
|
|
@ -274,6 +274,7 @@ public class UserConfig {
|
|||
lastBroadcastId = -1;
|
||||
saveIncomingPhotos = false;
|
||||
blockedUsersLoaded = false;
|
||||
channelsLoaded = false;
|
||||
appLocked = false;
|
||||
passcodeType = 0;
|
||||
passcodeHash = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue