Added requireImage arg to restrict calendar clicks to dates with images.

This commit is contained in:
23rd
2026-02-09 18:25:16 +03:00
parent dfd5df4265
commit 5d9271ea86
3 changed files with 17 additions and 0 deletions
@@ -2875,6 +2875,7 @@ void SessionController::showCalendar(ShowCalendarDescriptor &&descriptor) {
session().api().resolveJumpToDate(chat, date, open);
}
};
const auto requireImage = !!searchCalendarResult.customJump;
show(Box<Ui::CalendarBox>(Ui::CalendarBoxArgs{
.month = highlighted,
.highlighted = highlighted,
@@ -2886,6 +2887,7 @@ void SessionController::showCalendar(ShowCalendarDescriptor &&descriptor) {
.allowsSelection = history->peer->isUser(),
.selectionChanged = selectionChanged,
.dynamicImageForDate = std::move(searchCalendarResult.factory),
.requireImage = requireImage,
}));
}