mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 16:15:13 +00:00
Enable jump to date in feed.
This commit is contained in:
@@ -128,11 +128,7 @@ DialogsWidget::DialogsWidget(QWidget *parent, not_null<Window::Controller*> cont
|
||||
subscribe(Adaptive::Changed(), [this] { updateForwardBar(); });
|
||||
|
||||
_cancelSearch->setClickedCallback([this] { onCancelSearch(); });
|
||||
_jumpToDate->entity()->setClickedCallback([this] {
|
||||
if (const auto peer = _searchInChat.peer()) {
|
||||
this->controller()->showJumpToDate(peer, QDate());
|
||||
}
|
||||
});
|
||||
_jumpToDate->entity()->setClickedCallback([this] { showJumpToDate(); });
|
||||
_chooseFromUser->entity()->setClickedCallback([this] { showSearchFrom(); });
|
||||
_lockUnlock->setVisible(Global::LocalPasscode());
|
||||
subscribe(Global::RefLocalPasscodeChanged(), [this] { updateLockUnlockVisibility(); });
|
||||
@@ -1036,6 +1032,12 @@ void DialogsWidget::clearSearchCache() {
|
||||
MTP::cancel(base::take(_searchRequest));
|
||||
}
|
||||
|
||||
void DialogsWidget::showJumpToDate() {
|
||||
if (_searchInChat) {
|
||||
this->controller()->showJumpToDate(_searchInChat, QDate());
|
||||
}
|
||||
}
|
||||
|
||||
void DialogsWidget::showSearchFrom() {
|
||||
if (const auto peer = _searchInChat.peer()) {
|
||||
const auto chat = _searchInChat;
|
||||
|
Reference in New Issue
Block a user