Fix crash on album parts being deleted.

This commit is contained in:
John Preston 2018-03-13 13:54:24 +03:00
parent 999fa39d7c
commit 7a849b2899
1 changed files with 8 additions and 0 deletions

View File

@ -573,6 +573,14 @@ HistoryWidget::HistoryWidget(
updateHistoryGeometry();
}
}, lifetime());
Auth().data().itemViewRefreshRequest(
) | rpl::start_with_next([this](auto item) {
// While HistoryInner doesn't own item views we must refresh them
// even if the list is not yet created / was destroyed.
if (!_list) {
item->refreshMainView();
}
}, lifetime());
Auth().data().animationPlayInlineRequest(
) | rpl::start_with_next([this](auto item) {
if (const auto view = item->mainView()) {