diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar
index afc98ab..bb09633 100644
Binary files a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar and b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar differ
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.md5 b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.md5
index 473e72e..89c8e35 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.md5
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.md5
@@ -1 +1 @@
-0f10025815cc3b3a056bbf80206e8eb0
\ No newline at end of file
+333292b76b1e8ad69a2818d5e07c54cf
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha1 b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha1
index c23cf96..fddf849 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha1
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha1
@@ -1 +1 @@
-e87d6e5bf997e0afc996543cd9f4b0c9eb807d71
\ No newline at end of file
+ff44e564273451158eb7b3a8a058c709003ca6bf
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha256 b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha256
index eb7d2d5..2a24566 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha256
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha256
@@ -1 +1 @@
-0d930b968b9478cbac3f4ad19a8ee6337f53c3d11cf508be5c3e34394c7100a1
\ No newline at end of file
+05a65aae19523c40972bc6b45297b151c0180b35f1a1814d45fa63bf9832f7c2
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha512 b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha512
index 50a0322..02c1630 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha512
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/1.0.1/WKIMLib_loca-1.0.1.aar.sha512
@@ -1 +1 @@
-552b58a2c784495d09379f18a96d7852a7676162c88b981322be99d88305fad868f216817dcf90f5b58e71aaab9354d84743842c74197c8f9287e2e0198e16b9
\ No newline at end of file
+cafa49ce7676b24140f3f26abc1a477f1a346b70198834ae3f45c6f26d2b0fad89f8a1ee207cf9f058491b850bc41c4a8b7dc838fec819380f996804bcd81547
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml
index ca3d6e6..c28d75c 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml
@@ -8,6 +8,6 @@
1.0.1
- 20230620112658
+ 20230626111553
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.md5 b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.md5
index 948c448..4d7f27c 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.md5
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.md5
@@ -1 +1 @@
-68684efbe4367ca3e93e9e2de3b4bbe6
\ No newline at end of file
+f48c460f92fc1ee9b0bd8974a9553507
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha1 b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha1
index b5951ac..3d10db2 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha1
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha1
@@ -1 +1 @@
-204705418f2c471bd0cc45d0c1ed7aac895e0473
\ No newline at end of file
+bd9945005606fc498af5030a1f96d8d58297dbca
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha256 b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha256
index b9b5566..45508a8 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha256
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha256
@@ -1 +1 @@
-423550f9f280d46f4dcfe91d2d1700d51221f95b141e3b0c24d5d6dc69242450
\ No newline at end of file
+b495b7552814cb94748400f19d8fc8e7ee3d69e6fcfce8371bc645fab48975fa
\ No newline at end of file
diff --git a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha512 b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha512
index ba80972..83b388f 100644
--- a/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha512
+++ b/repository/com/xinbida/wukongim/WKIMLib_loca/maven-metadata.xml.sha512
@@ -1 +1 @@
-59c51a68cbd57fa15cad20c4443378061195145dfb48aa343450fa3c05239bfcd08d3f479b1000bef3aaa622ee53f9672a60462d569dfd824e42199d38cc07cf
\ No newline at end of file
+1629ee0f00564e9526d3143f71253963040d65a34d04b0af3635e2c957747f6b2f2e52cad0249d086c2795e7a0ba231f7ea48b5730f908e9c0d4246caebbc2aa
\ No newline at end of file
diff --git a/wkim/src/main/java/com/xinbida/wukongim/db/MsgDbManager.java b/wkim/src/main/java/com/xinbida/wukongim/db/MsgDbManager.java
index 4f5003b..d6f0527 100644
--- a/wkim/src/main/java/com/xinbida/wukongim/db/MsgDbManager.java
+++ b/wkim/src/main/java/com/xinbida/wukongim/db/MsgDbManager.java
@@ -8,6 +8,7 @@ import static com.xinbida.wukongim.db.WKDBColumns.TABLE.messageExtra;
import android.content.ContentValues;
import android.database.Cursor;
import android.text.TextUtils;
+import android.util.Log;
import com.xinbida.wukongim.WKIM;
import com.xinbida.wukongim.WKIMApplication;
@@ -59,7 +60,6 @@ public class MsgDbManager {
public void getOrSyncHistoryMessages(String channelId, byte channelType, long oldestOrderSeq, boolean contain, int pullMode, int limit, final IGetOrSyncHistoryMsgBack iGetOrSyncHistoryMsgBack) {
//获取原始数据
List list = getMessages(channelId, channelType, oldestOrderSeq, contain, pullMode, limit);
-
//业务判断数据
List tempList = new ArrayList<>();
for (int i = 0, size = list.size(); i < size; i++) {
@@ -80,18 +80,10 @@ public class MsgDbManager {
minMessageSeq = tempList.get(i).messageSeq;
}
}
-
//是否同步消息
boolean isSyncMsg = false;
- //reverse false:从区间大值开始拉取true:从区间小值开始拉取
- boolean reverse = false;
long startMsgSeq = 0;
long endMsgSeq = 0;
- //同步消息的最大messageSeq
-// long syncMaxMsgSeq = 0;
- //同步消息最小messageSeq,
-// long syncMinMsgSeq = 0;
-
//判断页与页之间是否连续
long oldestMsgSeq;
@@ -103,21 +95,15 @@ public class MsgDbManager {
//下拉获取消息
if (maxMessageSeq != 0 && oldestMsgSeq != 0 && oldestMsgSeq - maxMessageSeq > 1) {
isSyncMsg = true;
-// syncMaxMsgSeq = oldestMsgSeq;
-// syncMinMsgSeq = maxMessageSeq;
startMsgSeq = maxMessageSeq;
endMsgSeq = oldestMsgSeq;
- reverse = false;//区间大值开始获取
}
} else {
//上拉获取消息
if (minMessageSeq != 0 && oldestMsgSeq != 0 && minMessageSeq - oldestMsgSeq > 1) {
isSyncMsg = true;
-// syncMaxMsgSeq = minMessageSeq;
-// syncMinMsgSeq = oldestMsgSeq;
- startMsgSeq = minMessageSeq;
- endMsgSeq = oldestMsgSeq;
- reverse = true;//区间小值开始获取
+ startMsgSeq = oldestMsgSeq;
+ endMsgSeq = minMessageSeq;
}
}
@@ -169,48 +155,15 @@ public class MsgDbManager {
if (pullMode == 0) {
//如果下拉获取数据
isSyncMsg = true;
- reverse = false;//从区间大值开始获取数据
-// syncMinMsgSeq = 0;
-// syncMaxMsgSeq = oldestMsgSeq;
startMsgSeq = oldestMsgSeq;
endMsgSeq = 0;
} else {
//如果上拉获取数据
isSyncMsg = true;
- reverse = true;//从区间小值开始获取数据
-// syncMaxMsgSeq = 0;
-// syncMinMsgSeq = maxMessageSeq;
startMsgSeq = oldestMsgSeq;
endMsgSeq = 0;
}
}
-// if (!isContain) {
-// isSyncMsg = true;
-// if (dropDown) {
-// reverse = false;//从区间大值开始获取数据
-// syncMinMsgSeq = 0;
-// syncMaxMsgSeq = oldestMsgSeq;
-// }else {
-// reverse = true;//从区间小值开始获取数据
-// syncMaxMsgSeq = 0;
-// syncMinMsgSeq = oldestMsgSeq;
-// }
-// }
- // 如果提醒的某条消息未在本地同步消息范围内,则将该范围缩小到需要同步到消息序号上
-// if (oldestMsgSeq != 0) {
-// if (reverse) {
-// // 从大开始同步
-// if (oldestMsgSeq < syncMaxMsgSeq - limit) {
-// syncMaxMsgSeq = oldestMsgSeq + 3;
-// }
-// } else {
-// // 从小开始同步
-// if (oldestMsgSeq > syncMinMsgSeq + limit) {
-// syncMinMsgSeq = oldestMsgSeq - 3;
-// }
-// }
-// }
-
if (isSyncMsg && startMsgSeq != endMsgSeq && requestCount < 5) {
//同步消息
requestCount++;