Fix box title dynamic change.
This commit is contained in:
parent
d6e7aa6f63
commit
566f301636
1 changed files with 6 additions and 2 deletions
|
|
@ -151,9 +151,13 @@ void BoxLayerWidget::parentResized() {
|
|||
void BoxLayerWidget::setTitle(rpl::producer<TextWithEntities> 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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue