projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b433321
)
properly fixing dupes
author
Marcus Eggenberger
<egs@quassel-irc.org>
Sun, 12 Oct 2008 16:47:06 +0000
(18:47 +0200)
committer
Marcus Eggenberger
<egs@quassel-irc.org>
Sun, 12 Oct 2008 16:47:06 +0000
(18:47 +0200)
src/client/messagemodel.cpp
patch
|
blob
|
history
diff --git
a/src/client/messagemodel.cpp
b/src/client/messagemodel.cpp
index
868082c
..
09d8ddc
100644
(file)
--- a/
src/client/messagemodel.cpp
+++ b/
src/client/messagemodel.cpp
@@
-218,6
+218,11
@@
int MessageModel::insertMessagesGracefully(const QList<Message> &msglist) {
break;
processedMsgs++;
break;
processedMsgs++;
+ if(grouplist.isEmpty()) { // as long as we don't have a starting point, we have to update the dupeId
+ idx = indexForId((*iter).msgId());
+ if(idx >= 0 && !_messageList.isEmpty())
+ dupeId = _messageList[idx]->msgId();
+ }
if((*iter).msgId() != dupeId) {
if(!grouplist.isEmpty()) {
QDateTime nextTs = grouplist.value(0).timestamp();
if((*iter).msgId() != dupeId) {
if(!grouplist.isEmpty()) {
QDateTime nextTs = grouplist.value(0).timestamp();
@@
-244,6
+249,11
@@
int MessageModel::insertMessagesGracefully(const QList<Message> &msglist) {
break;
processedMsgs++;
break;
processedMsgs++;
+ if(grouplist.isEmpty()) { // as long as we don't have a starting point, we have to update the dupeId
+ idx = indexForId((*iter).msgId());
+ if(idx >= 0 && !_messageList.isEmpty())
+ dupeId = _messageList[idx]->msgId();
+ }
if((*iter).msgId() != dupeId) {
if(!grouplist.isEmpty()) {
QDateTime nextTs = grouplist.value(0).timestamp();
if((*iter).msgId() != dupeId) {
if(!grouplist.isEmpty()) {
QDateTime nextTs = grouplist.value(0).timestamp();
@@
-267,7
+277,6
@@
int MessageModel::insertMessagesGracefully(const QList<Message> &msglist) {
}
}
}
}
- Q_ASSERT(idx == indexForId(grouplist.first().msgId()) && idx == indexForId(grouplist.last().msgId()));
insertMessageGroup(grouplist);
return processedMsgs;
}
insertMessageGroup(grouplist);
return processedMsgs;
}