mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
In jump-to-date don't clear history stack.
This commit is contained in:
@@ -1441,12 +1441,19 @@ void SessionController::showCalendar(Dialogs::Key chat, QDate requestedDate) {
|
||||
button->setPointerCursor(false);
|
||||
}
|
||||
};
|
||||
const auto weak = base::make_weak(this);
|
||||
const auto jump = [=](const QDate &date) {
|
||||
const auto open = [=](not_null<PeerData*> peer, MsgId id) {
|
||||
if (const auto strong = weak.get()) {
|
||||
strong->showPeerHistory(peer, SectionShow::Way::Forward, id);
|
||||
}
|
||||
};
|
||||
session().api().resolveJumpToDate(chat, date, open);
|
||||
};
|
||||
show(Box<Ui::CalendarBox>(Ui::CalendarBoxArgs{
|
||||
.month = highlighted,
|
||||
.highlighted = highlighted,
|
||||
.callback = [=](const QDate &date) {
|
||||
session().api().jumpToDate(chat, date);
|
||||
},
|
||||
.callback = [=](const QDate &date) { jump(date); },
|
||||
.minDate = minPeerDate,
|
||||
.maxDate = maxPeerDate,
|
||||
.allowsSelection = history->peer->isUser(),
|
||||
|
Reference in New Issue
Block a user