From 7a849b2899db52e997ca5d35659dbcac16442261 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 13 Mar 2018 13:54:24 +0300 Subject: [PATCH] Fix crash on album parts being deleted. --- Telegram/SourceFiles/history/history_widget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 77530b888..5b4fa85a0 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -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()) {