mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Add calls log box.
PeerListBox can have many rows with the same PeerData. PeerListBox::Row can have arbitrary action on the right side.
This commit is contained in:
@@ -1504,31 +1504,28 @@ bool DialogsInner::searchReceived(const QVector<MTPMessage> &messages, DialogsSe
|
||||
|
||||
TimeId lastDateFound = 0;
|
||||
for_const (auto message, messages) {
|
||||
if (auto msgId = idFromMessage(message)) {
|
||||
auto peerId = peerFromMessage(message);
|
||||
auto lastDate = dateFromMessage(message);
|
||||
if (auto peer = App::peerLoaded(peerId)) {
|
||||
if (lastDate) {
|
||||
auto item = App::histories().addNewMessage(message, NewMessageExisting);
|
||||
_searchResults.push_back(std::make_unique<Dialogs::FakeRow>(item));
|
||||
lastDateFound = lastDate;
|
||||
if (isGlobalSearch) {
|
||||
_lastSearchDate = lastDateFound;
|
||||
}
|
||||
}
|
||||
auto msgId = idFromMessage(message);
|
||||
auto peerId = peerFromMessage(message);
|
||||
auto lastDate = dateFromMessage(message);
|
||||
if (auto peer = App::peerLoaded(peerId)) {
|
||||
if (lastDate) {
|
||||
auto item = App::histories().addNewMessage(message, NewMessageExisting);
|
||||
_searchResults.push_back(std::make_unique<Dialogs::FakeRow>(item));
|
||||
lastDateFound = lastDate;
|
||||
if (isGlobalSearch) {
|
||||
_lastSearchPeer = peer;
|
||||
_lastSearchDate = lastDateFound;
|
||||
}
|
||||
} else {
|
||||
LOG(("API Error: a search results with not loaded peer %1").arg(peerId));
|
||||
}
|
||||
if (isMigratedSearch) {
|
||||
_lastSearchMigratedId = msgId;
|
||||
} else {
|
||||
_lastSearchId = msgId;
|
||||
if (isGlobalSearch) {
|
||||
_lastSearchPeer = peer;
|
||||
}
|
||||
} else {
|
||||
LOG(("API Error: a search results with not message id"));
|
||||
LOG(("API Error: a search results with not loaded peer %1").arg(peerId));
|
||||
}
|
||||
if (isMigratedSearch) {
|
||||
_lastSearchMigratedId = msgId;
|
||||
} else {
|
||||
_lastSearchId = msgId;
|
||||
}
|
||||
}
|
||||
if (isMigratedSearch) {
|
||||
|
Reference in New Issue
Block a user