mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-04 16:45:12 +00:00
[all] / [one from chat] in support search results.
This commit is contained in:
@@ -237,7 +237,7 @@ DialogsWidget::DialogsWidget(QWidget *parent, not_null<Window::Controller*> cont
|
||||
updateJumpToDateVisibility(true);
|
||||
updateSearchFromVisibility(true);
|
||||
setupConnectingWidget();
|
||||
setupSupportLoadingLimit();
|
||||
setupSupportMode();
|
||||
}
|
||||
|
||||
void DialogsWidget::setupConnectingWidget() {
|
||||
@@ -246,15 +246,28 @@ void DialogsWidget::setupConnectingWidget() {
|
||||
Window::AdaptiveIsOneColumn());
|
||||
}
|
||||
|
||||
void DialogsWidget::setupSupportLoadingLimit() {
|
||||
void DialogsWidget::setupSupportMode() {
|
||||
if (!Auth().supportMode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Auth().settings().supportChatsTimeSliceValue(
|
||||
) | rpl::start_with_next([=](int seconds) {
|
||||
_dialogsLoadTill = seconds ? std::max(unixtime() - seconds, 0) : 0;
|
||||
refreshLoadMoreButton();
|
||||
}, lifetime());
|
||||
|
||||
Auth().settings().supportAllSearchResultsValue(
|
||||
) | rpl::filter([=] {
|
||||
return !_searchQuery.isEmpty();
|
||||
}) | rpl::start_with_next([=] {
|
||||
_searchTimer.stop();
|
||||
_searchCache.clear();
|
||||
_searchQueries.clear();
|
||||
_searchQuery = QString();
|
||||
_scroll->scrollToY(0);
|
||||
onSearchMessages();
|
||||
}, lifetime());
|
||||
}
|
||||
|
||||
void DialogsWidget::checkUpdateStatus() {
|
||||
@@ -1474,7 +1487,6 @@ void DialogsWidget::scrollToEntry(const Dialogs::RowDescriptor &entry) {
|
||||
|
||||
void DialogsWidget::removeDialog(Dialogs::Key key) {
|
||||
_inner->removeDialog(key);
|
||||
applyFilterUpdate(true);
|
||||
}
|
||||
|
||||
Dialogs::IndexedList *DialogsWidget::contactsList() {
|
||||
|
Reference in New Issue
Block a user