Commit c783e25d authored by DrKLO's avatar DrKLO

partly revert last commit, fixed infinite updating

parent afeb66b1
......@@ -82,7 +82,7 @@ android {
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 223
versionCode 224
versionName "1.4.10"
}
}
......@@ -52,6 +52,7 @@
android:name="org.telegram.ui.LaunchActivity"
android:windowSoftInputMode="adjustResize"
android:hardwareAccelerated="true"
android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
......@@ -3441,7 +3441,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (missingData) {
needGetDiff = true;
} else {
if (MessagesStorage.lastSeqValue + 1 == updates.seq && !gettingDifference) {
if (MessagesStorage.lastSeqValue + 1 == updates.seq) {
TLRPC.TL_message message = new TLRPC.TL_message();
message.from_id = updates.from_id;
message.id = updates.id;
......@@ -3503,7 +3503,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
if (missingData) {
needGetDiff = true;
} else {
if (MessagesStorage.lastSeqValue + 1 == updates.seq && !gettingDifference) {
if (MessagesStorage.lastSeqValue + 1 == updates.seq) {
TLRPC.TL_message message = new TLRPC.TL_message();
message.from_id = updates.from_id;
message.id = updates.id;
......@@ -3562,7 +3562,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
}
}
} 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);
int lastPtsValue = MessagesStorage.lastPtsValue;
int lastQtsValue = MessagesStorage.lastQtsValue;
......@@ -3592,7 +3592,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
}
}
} 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);
int lastPtsValue = MessagesStorage.lastPtsValue;
int lastQtsValue = MessagesStorage.lastQtsValue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment