diff --git a/ui/layers/box_layer_widget.cpp b/ui/layers/box_layer_widget.cpp index d16a3b9..fe80d90 100644 --- a/ui/layers/box_layer_widget.cpp +++ b/ui/layers/box_layer_widget.cpp @@ -151,9 +151,13 @@ void BoxLayerWidget::parentResized() { void BoxLayerWidget::setTitle(rpl::producer title) { const auto wasTitle = hasTitle(); if (title) { - _title.create(this, std::move(title), st::boxTitle); + _title.create(this, rpl::duplicate(title), st::boxTitle); _title->show(); - updateTitlePosition(); + std::move( + title + ) | rpl::start_with_next([=] { + updateTitlePosition(); + }, _title->lifetime()); } else { _title.destroy(); }