mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 14:35:03 +01:00
partly revert last commit, fixed infinite updating
This commit is contained in:
parent
afeb66b18c
commit
c783e25d69
3 changed files with 6 additions and 5 deletions
|
@ -82,7 +82,7 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 8
|
minSdkVersion 8
|
||||||
targetSdkVersion 19
|
targetSdkVersion 19
|
||||||
versionCode 223
|
versionCode 224
|
||||||
versionName "1.4.10"
|
versionName "1.4.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
android:name="org.telegram.ui.LaunchActivity"
|
android:name="org.telegram.ui.LaunchActivity"
|
||||||
android:windowSoftInputMode="adjustResize"
|
android:windowSoftInputMode="adjustResize"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
|
android:launchMode="singleTask"
|
||||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
|
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
|
@ -3441,7 +3441,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||||
if (missingData) {
|
if (missingData) {
|
||||||
needGetDiff = true;
|
needGetDiff = true;
|
||||||
} else {
|
} else {
|
||||||
if (MessagesStorage.lastSeqValue + 1 == updates.seq && !gettingDifference) {
|
if (MessagesStorage.lastSeqValue + 1 == updates.seq) {
|
||||||
TLRPC.TL_message message = new TLRPC.TL_message();
|
TLRPC.TL_message message = new TLRPC.TL_message();
|
||||||
message.from_id = updates.from_id;
|
message.from_id = updates.from_id;
|
||||||
message.id = updates.id;
|
message.id = updates.id;
|
||||||
|
@ -3503,7 +3503,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||||
if (missingData) {
|
if (missingData) {
|
||||||
needGetDiff = true;
|
needGetDiff = true;
|
||||||
} else {
|
} else {
|
||||||
if (MessagesStorage.lastSeqValue + 1 == updates.seq && !gettingDifference) {
|
if (MessagesStorage.lastSeqValue + 1 == updates.seq) {
|
||||||
TLRPC.TL_message message = new TLRPC.TL_message();
|
TLRPC.TL_message message = new TLRPC.TL_message();
|
||||||
message.from_id = updates.from_id;
|
message.from_id = updates.from_id;
|
||||||
message.id = updates.id;
|
message.id = updates.id;
|
||||||
|
@ -3562,7 +3562,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (updates instanceof TLRPC.TL_updatesCombined) {
|
} else if (updates instanceof TLRPC.TL_updatesCombined) {
|
||||||
if ((MessagesStorage.lastSeqValue + 1 == updates.seq_start || MessagesStorage.lastSeqValue == updates.seq_start) && !gettingDifference) {
|
if (MessagesStorage.lastSeqValue + 1 == updates.seq_start || MessagesStorage.lastSeqValue == updates.seq_start) {
|
||||||
MessagesStorage.getInstance().putUsersAndChats(updates.users, updates.chats, true, true);
|
MessagesStorage.getInstance().putUsersAndChats(updates.users, updates.chats, true, true);
|
||||||
int lastPtsValue = MessagesStorage.lastPtsValue;
|
int lastPtsValue = MessagesStorage.lastPtsValue;
|
||||||
int lastQtsValue = MessagesStorage.lastQtsValue;
|
int lastQtsValue = MessagesStorage.lastQtsValue;
|
||||||
|
@ -3592,7 +3592,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (updates instanceof TLRPC.TL_updates) {
|
} else if (updates instanceof TLRPC.TL_updates) {
|
||||||
if ((MessagesStorage.lastSeqValue + 1 == updates.seq || updates.seq == 0 || updates.seq == MessagesStorage.lastSeqValue) && !gettingDifference) {
|
if (MessagesStorage.lastSeqValue + 1 == updates.seq || updates.seq == 0 || updates.seq == MessagesStorage.lastSeqValue) {
|
||||||
MessagesStorage.getInstance().putUsersAndChats(updates.users, updates.chats, true, true);
|
MessagesStorage.getInstance().putUsersAndChats(updates.users, updates.chats, true, true);
|
||||||
int lastPtsValue = MessagesStorage.lastPtsValue;
|
int lastPtsValue = MessagesStorage.lastPtsValue;
|
||||||
int lastQtsValue = MessagesStorage.lastQtsValue;
|
int lastQtsValue = MessagesStorage.lastQtsValue;
|
||||||
|
|
Loading…
Reference in a new issue