mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Fix possible crash in replies (overlapping ids).
This commit is contained in:
parent
bde3da53b6
commit
3823bf9c0d
1 changed files with 2 additions and 2 deletions
|
@ -614,9 +614,9 @@ bool RepliesList::processMessagesIsEmpty(const MTPmessages_Messages &result) {
|
||||||
for (const auto &message : list) {
|
for (const auto &message : list) {
|
||||||
if (const auto item = owner.addNewMessage(message, localFlags, type)) {
|
if (const auto item = owner.addNewMessage(message, localFlags, type)) {
|
||||||
if (item->replyToTop() == _rootId) {
|
if (item->replyToTop() == _rootId) {
|
||||||
if (toFront) {
|
if (toFront && item->id > _list.front()) {
|
||||||
refreshed.push_back(item->id);
|
refreshed.push_back(item->id);
|
||||||
} else {
|
} else if (_list.empty() || item->id < _list.back()) {
|
||||||
_list.push_back(item->id);
|
_list.push_back(item->id);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue