mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 23:15:59 +00:00
Improve support shortcuts handling.
This commit is contained in:
@@ -226,6 +226,10 @@ DialogsWidget::DialogsWidget(QWidget *parent, not_null<Window::Controller*> cont
|
||||
loadDialogs();
|
||||
}
|
||||
});
|
||||
_inner->listBottomReached(
|
||||
) | rpl::start_with_next([=] {
|
||||
loadMoreBlockedByDateChats();
|
||||
}, lifetime());
|
||||
|
||||
_filter->setFocusPolicy(Qt::StrongFocus);
|
||||
_filter->customUpDown(true);
|
||||
@@ -530,14 +534,7 @@ void DialogsWidget::refreshLoadMoreButton() {
|
||||
st::dialogsLoadMore,
|
||||
st::dialogsLoadMore);
|
||||
_loadMoreChats->addClickHandler([=] {
|
||||
if (_loadMoreChats->isDisabled()) {
|
||||
return;
|
||||
}
|
||||
const auto max = Auth().settings().supportChatsTimeSlice();
|
||||
_dialogsLoadTill = _dialogsOffsetDate
|
||||
? (_dialogsOffsetDate - max)
|
||||
: (unixtime() - max);
|
||||
loadDialogs();
|
||||
loadMoreBlockedByDateChats();
|
||||
});
|
||||
updateControlsGeometry();
|
||||
}
|
||||
@@ -546,6 +543,17 @@ void DialogsWidget::refreshLoadMoreButton() {
|
||||
_loadMoreChats->setText(loading ? "Loading..." : "Load more");
|
||||
}
|
||||
|
||||
void DialogsWidget::loadMoreBlockedByDateChats() {
|
||||
if (!_loadMoreChats || _loadMoreChats->isDisabled()) {
|
||||
return;
|
||||
}
|
||||
const auto max = Auth().settings().supportChatsTimeSlice();
|
||||
_dialogsLoadTill = _dialogsOffsetDate
|
||||
? (_dialogsOffsetDate - max)
|
||||
: (unixtime() - max);
|
||||
loadDialogs();
|
||||
}
|
||||
|
||||
void DialogsWidget::pinnedDialogsReceived(
|
||||
const MTPmessages_PeerDialogs &result,
|
||||
mtpRequestId requestId) {
|
||||
|
Reference in New Issue
Block a user