mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-04-29 04:29:33 +00:00
Update to 8.0.1 (2428)
This commit is contained in:
parent
368822d20f
commit
42feed0f42
351 changed files with 22083 additions and 13428 deletions
|
|
@ -31,7 +31,7 @@ public class UserConfig extends BaseController {
|
|||
public int lastSendMessageId = -210000;
|
||||
public int lastBroadcastId = -1;
|
||||
public int contactsSavedCount;
|
||||
public int clientUserId;
|
||||
public long clientUserId;
|
||||
public int lastContactsSyncTime;
|
||||
public int lastHintsSyncTime;
|
||||
public boolean draftsLoaded;
|
||||
|
|
@ -43,9 +43,9 @@ public class UserConfig extends BaseController {
|
|||
public boolean hasValidDialogLoadIds;
|
||||
public int migrateOffsetId = -1;
|
||||
public int migrateOffsetDate = -1;
|
||||
public int migrateOffsetUserId = -1;
|
||||
public int migrateOffsetChatId = -1;
|
||||
public int migrateOffsetChannelId = -1;
|
||||
public long migrateOffsetUserId = -1;
|
||||
public long migrateOffsetChatId = -1;
|
||||
public long migrateOffsetChannelId = -1;
|
||||
public long migrateOffsetAccess = -1;
|
||||
public boolean filtersLoaded;
|
||||
|
||||
|
|
@ -136,9 +136,9 @@ public class UserConfig extends BaseController {
|
|||
editor.putInt("6migrateOffsetId", migrateOffsetId);
|
||||
if (migrateOffsetId != -1) {
|
||||
editor.putInt("6migrateOffsetDate", migrateOffsetDate);
|
||||
editor.putInt("6migrateOffsetUserId", migrateOffsetUserId);
|
||||
editor.putInt("6migrateOffsetChatId", migrateOffsetChatId);
|
||||
editor.putInt("6migrateOffsetChannelId", migrateOffsetChannelId);
|
||||
editor.putLong("6migrateOffsetUserId", migrateOffsetUserId);
|
||||
editor.putLong("6migrateOffsetChatId", migrateOffsetChatId);
|
||||
editor.putLong("6migrateOffsetChannelId", migrateOffsetChannelId);
|
||||
editor.putLong("6migrateOffsetAccess", migrateOffsetAccess);
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ public class UserConfig extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
public int getClientUserId() {
|
||||
public long getClientUserId() {
|
||||
synchronized (sync) {
|
||||
return currentUser != null ? currentUser.id : 0;
|
||||
}
|
||||
|
|
@ -271,9 +271,9 @@ public class UserConfig extends BaseController {
|
|||
migrateOffsetId = preferences.getInt("6migrateOffsetId", 0);
|
||||
if (migrateOffsetId != -1) {
|
||||
migrateOffsetDate = preferences.getInt("6migrateOffsetDate", 0);
|
||||
migrateOffsetUserId = preferences.getInt("6migrateOffsetUserId", 0);
|
||||
migrateOffsetChatId = preferences.getInt("6migrateOffsetChatId", 0);
|
||||
migrateOffsetChannelId = preferences.getInt("6migrateOffsetChannelId", 0);
|
||||
migrateOffsetUserId = AndroidUtilities.getPrefIntOrLong(preferences, "6migrateOffsetUserId", 0);
|
||||
migrateOffsetChatId = AndroidUtilities.getPrefIntOrLong(preferences, "6migrateOffsetChatId", 0);
|
||||
migrateOffsetChannelId = AndroidUtilities.getPrefIntOrLong(preferences, "6migrateOffsetChannelId", 0);
|
||||
migrateOffsetAccess = preferences.getLong("6migrateOffsetAccess", 0);
|
||||
}
|
||||
|
||||
|
|
@ -400,8 +400,7 @@ public class UserConfig extends BaseController {
|
|||
public static final int i_dialogsLoadOffsetUserId = 2;
|
||||
public static final int i_dialogsLoadOffsetChatId = 3;
|
||||
public static final int i_dialogsLoadOffsetChannelId = 4;
|
||||
public static final int i_dialogsLoadOffsetAccess_1 = 5;
|
||||
public static final int i_dialogsLoadOffsetAccess_2 = 6;
|
||||
public static final int i_dialogsLoadOffsetAccess = 5;
|
||||
|
||||
public int getTotalDialogsCount(int folderId) {
|
||||
return getPreferences().getInt("2totalDialogsLoadCount" + (folderId == 0 ? "" : folderId), 0);
|
||||
|
|
@ -411,24 +410,24 @@ public class UserConfig extends BaseController {
|
|||
getPreferences().edit().putInt("2totalDialogsLoadCount" + (folderId == 0 ? "" : folderId), totalDialogsLoadCount).commit();
|
||||
}
|
||||
|
||||
public int[] getDialogLoadOffsets(int folderId) {
|
||||
public long[] getDialogLoadOffsets(int folderId) {
|
||||
SharedPreferences preferences = getPreferences();
|
||||
int dialogsLoadOffsetId = preferences.getInt("2dialogsLoadOffsetId" + (folderId == 0 ? "" : folderId), hasValidDialogLoadIds ? 0 : -1);
|
||||
int dialogsLoadOffsetDate = preferences.getInt("2dialogsLoadOffsetDate" + (folderId == 0 ? "" : folderId), hasValidDialogLoadIds ? 0 : -1);
|
||||
int dialogsLoadOffsetUserId = preferences.getInt("2dialogsLoadOffsetUserId" + (folderId == 0 ? "" : folderId), hasValidDialogLoadIds ? 0 : -1);
|
||||
int dialogsLoadOffsetChatId = preferences.getInt("2dialogsLoadOffsetChatId" + (folderId == 0 ? "" : folderId), hasValidDialogLoadIds ? 0 : -1);
|
||||
int dialogsLoadOffsetChannelId = preferences.getInt("2dialogsLoadOffsetChannelId" + (folderId == 0 ? "" : folderId), hasValidDialogLoadIds ? 0 : -1);
|
||||
long dialogsLoadOffsetUserId = AndroidUtilities.getPrefIntOrLong(preferences, "2dialogsLoadOffsetUserId" + (folderId == 0 ? "" : folderId), hasValidDialogLoadIds ? 0 : -1);
|
||||
long dialogsLoadOffsetChatId = AndroidUtilities.getPrefIntOrLong(preferences, "2dialogsLoadOffsetChatId" + (folderId == 0 ? "" : folderId), hasValidDialogLoadIds ? 0 : -1);
|
||||
long dialogsLoadOffsetChannelId = AndroidUtilities.getPrefIntOrLong(preferences, "2dialogsLoadOffsetChannelId" + (folderId == 0 ? "" : folderId), hasValidDialogLoadIds ? 0 : -1);
|
||||
long dialogsLoadOffsetAccess = preferences.getLong("2dialogsLoadOffsetAccess" + (folderId == 0 ? "" : folderId), hasValidDialogLoadIds ? 0 : -1);
|
||||
return new int[]{dialogsLoadOffsetId, dialogsLoadOffsetDate, dialogsLoadOffsetUserId, dialogsLoadOffsetChatId, dialogsLoadOffsetChannelId, (int) dialogsLoadOffsetAccess, (int) (dialogsLoadOffsetAccess >> 32)};
|
||||
return new long[]{dialogsLoadOffsetId, dialogsLoadOffsetDate, dialogsLoadOffsetUserId, dialogsLoadOffsetChatId, dialogsLoadOffsetChannelId, dialogsLoadOffsetAccess};
|
||||
}
|
||||
|
||||
public void setDialogsLoadOffset(int folderId, int dialogsLoadOffsetId, int dialogsLoadOffsetDate, int dialogsLoadOffsetUserId, int dialogsLoadOffsetChatId, int dialogsLoadOffsetChannelId, long dialogsLoadOffsetAccess) {
|
||||
public void setDialogsLoadOffset(int folderId, int dialogsLoadOffsetId, int dialogsLoadOffsetDate, long dialogsLoadOffsetUserId, long dialogsLoadOffsetChatId, long dialogsLoadOffsetChannelId, long dialogsLoadOffsetAccess) {
|
||||
SharedPreferences.Editor editor = getPreferences().edit();
|
||||
editor.putInt("2dialogsLoadOffsetId" + (folderId == 0 ? "" : folderId), dialogsLoadOffsetId);
|
||||
editor.putInt("2dialogsLoadOffsetDate" + (folderId == 0 ? "" : folderId), dialogsLoadOffsetDate);
|
||||
editor.putInt("2dialogsLoadOffsetUserId" + (folderId == 0 ? "" : folderId), dialogsLoadOffsetUserId);
|
||||
editor.putInt("2dialogsLoadOffsetChatId" + (folderId == 0 ? "" : folderId), dialogsLoadOffsetChatId);
|
||||
editor.putInt("2dialogsLoadOffsetChannelId" + (folderId == 0 ? "" : folderId), dialogsLoadOffsetChannelId);
|
||||
editor.putLong("2dialogsLoadOffsetUserId" + (folderId == 0 ? "" : folderId), dialogsLoadOffsetUserId);
|
||||
editor.putLong("2dialogsLoadOffsetChatId" + (folderId == 0 ? "" : folderId), dialogsLoadOffsetChatId);
|
||||
editor.putLong("2dialogsLoadOffsetChannelId" + (folderId == 0 ? "" : folderId), dialogsLoadOffsetChannelId);
|
||||
editor.putLong("2dialogsLoadOffsetAccess" + (folderId == 0 ? "" : folderId), dialogsLoadOffsetAccess);
|
||||
editor.putBoolean("hasValidDialogLoadIds", true);
|
||||
editor.commit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue