mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Fix search in chat results loading.
This commit is contained in:
@@ -797,9 +797,11 @@ bool Widget::onSearchMessages(bool searchCache) {
|
|||||||
MTP_int(0)
|
MTP_int(0)
|
||||||
)).done([=](const MTPmessages_Messages &result) {
|
)).done([=](const MTPmessages_Messages &result) {
|
||||||
searchReceived(type, result, _searchRequest);
|
searchReceived(type, result, _searchRequest);
|
||||||
|
_searchInHistoryRequest = 0;
|
||||||
finish();
|
finish();
|
||||||
}).fail([=](const RPCError &error) {
|
}).fail([=](const RPCError &error) {
|
||||||
searchFailed(type, error, _searchRequest);
|
searchFailed(type, error, _searchRequest);
|
||||||
|
_searchInHistoryRequest = 0;
|
||||||
finish();
|
finish();
|
||||||
}).send();
|
}).send();
|
||||||
_searchQueries.insert(_searchRequest, _searchQuery);
|
_searchQueries.insert(_searchRequest, _searchQuery);
|
||||||
@@ -956,8 +958,12 @@ void Widget::onSearchMore() {
|
|||||||
MTP_int(0)
|
MTP_int(0)
|
||||||
)).done([=](const MTPmessages_Messages &result) {
|
)).done([=](const MTPmessages_Messages &result) {
|
||||||
searchReceived(type, result, _searchRequest);
|
searchReceived(type, result, _searchRequest);
|
||||||
|
_searchInHistoryRequest = 0;
|
||||||
|
finish();
|
||||||
}).fail([=](const RPCError &error) {
|
}).fail([=](const RPCError &error) {
|
||||||
searchFailed(type, error, _searchRequest);
|
searchFailed(type, error, _searchRequest);
|
||||||
|
_searchInHistoryRequest = 0;
|
||||||
|
finish();
|
||||||
}).send();
|
}).send();
|
||||||
if (!offsetId) {
|
if (!offsetId) {
|
||||||
_searchQueries.insert(_searchRequest, _searchQuery);
|
_searchQueries.insert(_searchRequest, _searchQuery);
|
||||||
@@ -1032,8 +1038,12 @@ void Widget::onSearchMore() {
|
|||||||
MTP_int(0)
|
MTP_int(0)
|
||||||
)).done([=](const MTPmessages_Messages &result) {
|
)).done([=](const MTPmessages_Messages &result) {
|
||||||
searchReceived(type, result, _searchRequest);
|
searchReceived(type, result, _searchRequest);
|
||||||
|
_searchInHistoryRequest = 0;
|
||||||
|
finish();
|
||||||
}).fail([=](const RPCError &error) {
|
}).fail([=](const RPCError &error) {
|
||||||
searchFailed(type, error, _searchRequest);
|
searchFailed(type, error, _searchRequest);
|
||||||
|
_searchInHistoryRequest = 0;
|
||||||
|
finish();
|
||||||
}).send();
|
}).send();
|
||||||
return _searchRequest;
|
return _searchRequest;
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user