2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Fixed display of default box for message schedule in correspond window.

This commit is contained in:
23rd
2024-04-18 04:02:40 +03:00
committed by John Preston
parent 3510ca7184
commit 01bfa46729
9 changed files with 12 additions and 12 deletions

View File

@@ -34,12 +34,11 @@ Fn<void()> DefaultSilentCallback(Fn<void(Api::SendOptions)> send) {
}
Fn<void()> DefaultScheduleCallback(
not_null<Ui::RpWidget*> parent,
std::shared_ptr<Ui::Show> show,
Type type,
Fn<void(Api::SendOptions)> send) {
const auto weak = Ui::MakeWeak(parent);
return [=] {
Ui::show(
return [=, weak = Ui::MakeWeak(show->toastParent())] {
show->showBox(
HistoryView::PrepareScheduleBox(
weak,
type,

View File

@@ -18,6 +18,7 @@ struct SendOptions;
namespace Ui {
class PopupMenu;
class RpWidget;
class Show;
} // namespace Ui
namespace Data {
@@ -41,7 +42,7 @@ enum class FillMenuResult {
Fn<void()> DefaultSilentCallback(Fn<void(Api::SendOptions)> send);
Fn<void()> DefaultScheduleCallback(
not_null<Ui::RpWidget*> parent,
std::shared_ptr<Ui::Show> show,
Type type,
Fn<void(Api::SendOptions)> send);
Fn<void()> DefaultWhenOnlineCallback(Fn<void(Api::SendOptions)> send);