diff --git a/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp b/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp index d6196934a..0a329c2fb 100644 --- a/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp +++ b/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp @@ -672,8 +672,12 @@ void ScheduleBox( width); }, content->lifetime()); + const auto calendar = + content->lifetime().make_state>(); QObject::connect(dayInput, &Ui::InputField::focused, [=] { - const auto calendar = std::make_shared>(); + if (*calendar) { + return; + } const auto chosen = [=](QDate chosen) { *date = chosen; (*calendar)->closeBox();