mirror of https://github.com/procxx/kepka.git
Fix search in chat results loading.
This commit is contained in:
parent
6ded5b74d0
commit
91fb9917bc
|
@ -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;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue