mirror of
https://github.com/WuKongIM/WuKongIMAndroidSDK
synced 2025-06-06 01:03:55 +00:00
修改查看不连续消息未同步问题
This commit is contained in:
parent
e0779a950f
commit
47ea031673
Binary file not shown.
@ -1 +1 @@
|
||||
ba3da42c631a8f1da07c6d50a61fc4cc
|
||||
3f93544eb1654acb3a4fb20f20a2e60e
|
@ -1 +1 @@
|
||||
5bf4fac6da79c9e3e6d7c5eeacd1608bb2fe643f
|
||||
dc3a097ac17b4302a211adcf10768c4a4ff9bf7b
|
@ -1 +1 @@
|
||||
a8fb0c37de52d4c533b511a742272c4cb7ba9b6bd2b62867fa5c1475429baf08
|
||||
22a85d8c1b276d428decdff1878bda476e11550fed96879221aef5998bba130a
|
@ -1 +1 @@
|
||||
f82ad34ba5827c7fa14d4cd66f71523e6ea3573ae0f26eb7fdc2df039d05643a49a84d54fa8e1590f81978fca3a5604c6ba6d56fe47f3983134ae07e83d86962
|
||||
571205bfba040264aac10c072ec7feb133445abd67b7da4e9f1f51d2efb7ee233a2cf400ce6e511205bc1b81b744ffdae99eb5d8345aabe4818885f04aa5fc7e
|
@ -8,6 +8,6 @@
|
||||
<versions>
|
||||
<version>1.0.1</version>
|
||||
</versions>
|
||||
<lastUpdated>20230718150400</lastUpdated>
|
||||
<lastUpdated>20230719144158</lastUpdated>
|
||||
</versioning>
|
||||
</metadata>
|
||||
|
@ -1 +1 @@
|
||||
03bdbc77fb87f493473e479111bcdeda
|
||||
919470fe90766da4792e54f44e1a9c9e
|
@ -1 +1 @@
|
||||
c9a474c48960e99c6818ccf85b7fe4cb6bcdda33
|
||||
5bac2f6f086268d971dbacc7acc8e630cc36c782
|
@ -1 +1 @@
|
||||
66e1cbf46da62821fb97f857fd275ad1d6f494e8b5ef6a1fb2cbe7bc05e94b94
|
||||
b9ce184c288fad90ab466510692ce44f41721abcef3509d165b77c54659113da
|
@ -1 +1 @@
|
||||
d84c337a857429c67c667ae7e86b20397f4b6188e109a23e751c6fb200a202f3175de0ed1cbd61007425ed4c18ae81cd54ba026f4e3ef61b6093b7883b9b865e
|
||||
9784ddeed1130181483eefe39228c9e70d2eba1026328fb3c9e8cbe8bac018e04fc6ef5c09dc1de840a1875ab6d5d56c67129dca6738adbefcc49e389c056390
|
@ -93,15 +93,15 @@ public class MsgDbManager {
|
||||
//下拉获取消息
|
||||
if (maxMessageSeq != 0 && oldestMsgSeq != 0 && oldestMsgSeq - maxMessageSeq > 1) {
|
||||
isSyncMsg = true;
|
||||
startMsgSeq = maxMessageSeq;
|
||||
endMsgSeq = oldestMsgSeq;
|
||||
startMsgSeq = oldestMsgSeq;
|
||||
endMsgSeq = maxMessageSeq;
|
||||
}
|
||||
} else {
|
||||
//上拉获取消息
|
||||
if (minMessageSeq != 0 && oldestMsgSeq != 0 && minMessageSeq - oldestMsgSeq > 1) {
|
||||
isSyncMsg = true;
|
||||
startMsgSeq = oldestMsgSeq;
|
||||
endMsgSeq = minMessageSeq;
|
||||
startMsgSeq = minMessageSeq;
|
||||
endMsgSeq = oldestMsgSeq;
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,7 +229,11 @@ public class MsgDbManager {
|
||||
sql = "SELECT * FROM (SELECT " + messageCols + "," + extraCols + " FROM " + message + " LEFT JOIN " + messageExtra + " on " + message + ".message_id=" + messageExtra + ".message_id WHERE " + message + ".channel_id='" + channelId + "' and " + message + ".channel_type=" + channelType + " and " + message + ".type<>0 and " + message + ".type<>99) where is_deleted=0 and is_mutual_deleted=0 order by order_seq desc limit 0," + limit;
|
||||
} else {
|
||||
if (pullMode == 0) {
|
||||
sql = "SELECT * FROM (SELECT " + messageCols + "," + extraCols + " FROM " + message + " LEFT JOIN " + messageExtra + " on " + message + ".message_id=" + messageExtra + ".message_id WHERE " + message + ".channel_id='" + channelId + "' and " + message + ".channel_type=" + channelType + " and " + message + ".type<>0 and " + message + ".type<>99 AND " + message + ".order_seq<" + oldestOrderSeq + ") where is_deleted=0 and is_mutual_deleted=0 order by order_seq desc limit 0," + limit;
|
||||
if (contain) {
|
||||
sql = "SELECT * FROM (SELECT " + messageCols + "," + extraCols + " FROM " + message + " LEFT JOIN " + messageExtra + " on " + message + ".message_id=" + messageExtra + ".message_id WHERE " + message + ".channel_id='" + channelId + "' and " + message + ".channel_type=" + channelType + " and " + message + ".type<>0 and " + message + ".type<>99 AND " + message + ".order_seq<=" + oldestOrderSeq + ") where is_deleted=0 and is_mutual_deleted=0 order by order_seq desc limit 0," + limit;
|
||||
} else {
|
||||
sql = "SELECT * FROM (SELECT " + messageCols + "," + extraCols + " FROM " + message + " LEFT JOIN " + messageExtra + " on " + message + ".message_id=" + messageExtra + ".message_id WHERE " + message + ".channel_id='" + channelId + "' and " + message + ".channel_type=" + channelType + " and " + message + ".type<>0 and " + message + ".type<>99 AND " + message + ".order_seq<" + oldestOrderSeq + ") where is_deleted=0 and is_mutual_deleted=0 order by order_seq desc limit 0," + limit;
|
||||
}
|
||||
} else {
|
||||
if (contain) {
|
||||
sql = "SELECT * FROM (SELECT " + messageCols + "," + extraCols + " FROM " + message + " LEFT JOIN " + messageExtra + " on " + message + ".message_id=" + messageExtra + ".message_id WHERE " + message + ".channel_id='" + channelId + "' and " + message + ".channel_type=" + channelType + " and " + message + ".type<>0 and " + message + ".type<>99 AND " + message + ".order_seq>=" + oldestOrderSeq + ") where is_deleted=0 and is_mutual_deleted=0 order by order_seq asc limit 0," + limit;
|
||||
|
@ -295,8 +295,10 @@ public class MsgManager extends BaseManager {
|
||||
long maxMsgSeq = getMaxMessageSeq(channelId, channelType);
|
||||
long aroundMsgSeq = getOrNearbyMsgSeq(aroundMsgOrderSeq);
|
||||
if (maxMsgSeq >= aroundMsgSeq && maxMsgSeq - aroundMsgSeq <= limit) {
|
||||
oldestOrderSeq = 0;
|
||||
contain = false;
|
||||
// 显示最后一页数据
|
||||
// oldestOrderSeq = 0;
|
||||
oldestOrderSeq = getMessageOrderSeq(maxMsgSeq,channelId,channelType);
|
||||
contain = true;
|
||||
pullMode = 0;
|
||||
} else {
|
||||
long minOrderSeq = MsgDbManager.getInstance().getOrderSeq(channelId, channelType, aroundMsgOrderSeq, 3);
|
||||
|
Loading…
x
Reference in New Issue
Block a user