|
@@ -103,7 +103,8 @@ public class DataManager {
|
|
for (MessageBean bean: beanList) {
|
|
for (MessageBean bean: beanList) {
|
|
if (bean.msgId == null || bean.msgId.isEmpty())
|
|
if (bean.msgId == null || bean.msgId.isEmpty())
|
|
continue;
|
|
continue;
|
|
- boolean isExist = isMessageBeanExsit(bean.msgId);
|
|
|
|
|
|
+ boolean isExist = isMessageBeanExsit(bean._id, bean.msgId);
|
|
|
|
+ Log.d(TAG, "fifterWithMessage: " + isExist + " msgId: " + bean.msgId);
|
|
if (!isExist) {
|
|
if (!isExist) {
|
|
arrayList.add(bean);
|
|
arrayList.add(bean);
|
|
}
|
|
}
|
|
@@ -134,10 +135,12 @@ public class DataManager {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean isMessageBeanExsit(String msgId) {
|
|
|
|
|
|
+ public boolean isMessageBeanExsit(long _id, String msgId) {
|
|
if (msgId == null || msgId.isEmpty())
|
|
if (msgId == null || msgId.isEmpty())
|
|
return false;
|
|
return false;
|
|
for (MessageBean bean: mMessagesList) {
|
|
for (MessageBean bean: mMessagesList) {
|
|
|
|
+ if (bean._id == _id)
|
|
|
|
+ return true;
|
|
if (bean.msgId == null || bean.msgId.isEmpty())
|
|
if (bean.msgId == null || bean.msgId.isEmpty())
|
|
continue;
|
|
continue;
|
|
if (bean.msgId.equals(msgId))
|
|
if (bean.msgId.equals(msgId))
|