Fix block chat list loading by date.

This commit is contained in:
John Preston 2019-04-30 14:21:56 +04:00
parent be64f18e96
commit db35c3de3b
2 changed files with 5 additions and 5 deletions

View file

@ -776,13 +776,11 @@ void ApiWrap::requestMoreDialogs(Data::Folder *folder) {
});
if (!folder) {
requestDialogs(folder);
requestContacts();
if (!_dialogsLoadState
|| (!_dialogsLoadState->listReceived
&& !_dialogsLoadState->requestId)) {
if (!_dialogsLoadState || !_dialogsLoadState->listReceived) {
refreshDialogsLoadBlocked();
}
requestDialogs(folder);
requestContacts();
}
_session->data().chatsListChanged(folder);
}).fail([=](const RPCError &error) {
@ -923,6 +921,7 @@ void ApiWrap::requestMoreBlockedByDateDialogs() {
_dialogsLoadTill = _dialogsLoadState->offsetDate
? (_dialogsLoadState->offsetDate - max)
: (unixtime() - max);
refreshDialogsLoadBlocked();
requestDialogs();
}

View file

@ -671,6 +671,7 @@ void Widget::refreshLoadMoreButton(bool mayBlock, bool isBlocked) {
st::dialogsLoadMoreButton,
st::dialogsLoadMore,
st::dialogsLoadMore);
_loadMoreChats->show();
_loadMoreChats->addClickHandler([=] {
loadMoreBlockedByDate();
});