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)
|
||||
)).done([=](const MTPmessages_Messages &result) {
|
||||
searchReceived(type, result, _searchRequest);
|
||||
_searchInHistoryRequest = 0;
|
||||
finish();
|
||||
}).fail([=](const RPCError &error) {
|
||||
searchFailed(type, error, _searchRequest);
|
||||
_searchInHistoryRequest = 0;
|
||||
finish();
|
||||
}).send();
|
||||
_searchQueries.insert(_searchRequest, _searchQuery);
|
||||
|
@ -956,8 +958,12 @@ void Widget::onSearchMore() {
|
|||
MTP_int(0)
|
||||
)).done([=](const MTPmessages_Messages &result) {
|
||||
searchReceived(type, result, _searchRequest);
|
||||
_searchInHistoryRequest = 0;
|
||||
finish();
|
||||
}).fail([=](const RPCError &error) {
|
||||
searchFailed(type, error, _searchRequest);
|
||||
_searchInHistoryRequest = 0;
|
||||
finish();
|
||||
}).send();
|
||||
if (!offsetId) {
|
||||
_searchQueries.insert(_searchRequest, _searchQuery);
|
||||
|
@ -1032,8 +1038,12 @@ void Widget::onSearchMore() {
|
|||
MTP_int(0)
|
||||
)).done([=](const MTPmessages_Messages &result) {
|
||||
searchReceived(type, result, _searchRequest);
|
||||
_searchInHistoryRequest = 0;
|
||||
finish();
|
||||
}).fail([=](const RPCError &error) {
|
||||
searchFailed(type, error, _searchRequest);
|
||||
_searchInHistoryRequest = 0;
|
||||
finish();
|
||||
}).send();
|
||||
return _searchRequest;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue