mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-04-29 04:29:33 +00:00
Update to 2.3.0
This commit is contained in:
parent
e5e31e20e4
commit
2073ead37e
296 changed files with 51945 additions and 1884 deletions
|
|
@ -30,6 +30,7 @@ public class UserConfig {
|
|||
private final static Object sync = new Object();
|
||||
public static boolean saveIncomingPhotos = false;
|
||||
public static int contactsVersion = 1;
|
||||
public static boolean waitingForPasswordEnter = false;
|
||||
|
||||
public static int getNewMessageId() {
|
||||
int id;
|
||||
|
|
@ -60,6 +61,7 @@ public class UserConfig {
|
|||
editor.putInt("lastBroadcastId", lastBroadcastId);
|
||||
editor.putBoolean("registeredForInternalPush", registeredForInternalPush);
|
||||
editor.putBoolean("blockedUsersLoaded", blockedUsersLoaded);
|
||||
editor.putBoolean("waitingForPasswordEnter", waitingForPasswordEnter);
|
||||
if (currentUser != null) {
|
||||
if (withFile) {
|
||||
SerializedData data = new SerializedData();
|
||||
|
|
@ -86,6 +88,18 @@ public class UserConfig {
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean isWaitingForPasswordEnter() {
|
||||
synchronized (sync) {
|
||||
return waitingForPasswordEnter;
|
||||
}
|
||||
}
|
||||
|
||||
public static void setWaitingForPasswordEnter(boolean value) {
|
||||
synchronized (sync) {
|
||||
waitingForPasswordEnter = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static int getClientUserId() {
|
||||
synchronized (sync) {
|
||||
return currentUser != null ? currentUser.id : 0;
|
||||
|
|
@ -180,6 +194,7 @@ public class UserConfig {
|
|||
lastBroadcastId = preferences.getInt("lastBroadcastId", -1);
|
||||
registeredForInternalPush = preferences.getBoolean("registeredForInternalPush", false);
|
||||
blockedUsersLoaded = preferences.getBoolean("blockedUsersLoaded", false);
|
||||
waitingForPasswordEnter = preferences.getBoolean("waitingForPasswordEnter", false);
|
||||
String user = preferences.getString("user", null);
|
||||
if (user != null) {
|
||||
byte[] userBytes = Base64.decode(user, Base64.DEFAULT);
|
||||
|
|
@ -196,6 +211,7 @@ public class UserConfig {
|
|||
currentUser = null;
|
||||
registeredForInternalPush = false;
|
||||
registeredForPush = false;
|
||||
waitingForPasswordEnter = false;
|
||||
contactsHash = "";
|
||||
importHash = "";
|
||||
lastLocalId = -210000;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue