mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added requireImage arg to restrict calendar clicks to dates with images.
This commit is contained in:
@@ -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,
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user