mirror of https://github.com/procxx/kepka.git
Shuffle code around a bit.
Crash reports point to addToUnreadMentions() call being corrupted. New reports could show is it responsible or setLastMessage() call.
This commit is contained in:
parent
37b018257e
commit
d5de064019
|
@ -1274,13 +1274,8 @@ not_null<HistoryItem*> History::addNewItem(not_null<HistoryItem*> adding, bool n
|
||||||
recountGrouping(groupFrom, groupTill);
|
recountGrouping(groupFrom, groupTill);
|
||||||
}
|
}
|
||||||
|
|
||||||
setLastMessage(adding);
|
|
||||||
if (newMsg) {
|
|
||||||
newItemAdded(adding);
|
|
||||||
}
|
|
||||||
|
|
||||||
adding->addToUnreadMentions(AddToUnreadMentionsMethod::New);
|
|
||||||
if (IsServerMsgId(adding->id)) {
|
if (IsServerMsgId(adding->id)) {
|
||||||
|
adding->addToUnreadMentions(AddToUnreadMentionsMethod::New);
|
||||||
if (auto sharedMediaTypes = adding->sharedMediaTypes()) {
|
if (auto sharedMediaTypes = adding->sharedMediaTypes()) {
|
||||||
if (newMsg) {
|
if (newMsg) {
|
||||||
Auth().storage().add(Storage::SharedMediaAddNew(
|
Auth().storage().add(Storage::SharedMediaAddNew(
|
||||||
|
@ -1378,6 +1373,11 @@ not_null<HistoryItem*> History::addNewItem(not_null<HistoryItem*> adding, bool n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setLastMessage(adding);
|
||||||
|
if (newMsg) {
|
||||||
|
newItemAdded(adding);
|
||||||
|
}
|
||||||
|
|
||||||
return adding;
|
return adding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue