From 0d415837a03dc9d695545df8f75740c8290da3bc Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 15 Mar 2018 18:22:55 +0300 Subject: [PATCH] Destroy old info button in top bar widget. Fixes #4503. --- .../SourceFiles/history/view/history_view_top_bar_widget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp index 341cbda34..008b0dc23 100644 --- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp @@ -386,8 +386,10 @@ void TopBarWidget::refreshInfoButton() { Ui::UserpicButton::Role::Custom, st::topBarInfoButton); info->showSavedMessagesOnSelf(true); + _info.destroy(); _info = std::move(info); } else if (const auto feed = _activeChat.feed()) { + _info.destroy(); _info = object_ptr( this, _controller,