From 9237a08b5341e0f6e9223663ce0b41e7c8512814 Mon Sep 17 00:00:00 2001 From: AlexeyZavar Date: Wed, 20 Nov 2024 16:56:07 +0300 Subject: [PATCH] fix: allow resize web apps --- Telegram/SourceFiles/history/history.cpp | 6 ++++-- Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/history/history.cpp b/Telegram/SourceFiles/history/history.cpp index a61bc6aab..58edd8b7f 100644 --- a/Telegram/SourceFiles/history/history.cpp +++ b/Telegram/SourceFiles/history/history.cpp @@ -549,8 +549,10 @@ void History::destroyMessage(not_null item) { const auto i = _items.find(hack); hack.release(); - Assert(i != end(_items)); - _items.erase(i); + // hack for Hide message + if (i != end(_items)) { + _items.erase(i); + } if (documentToCancel) { session().data().documentMessageRemoved(documentToCancel); diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp index 257ac1689..b834c9506 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp +++ b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp @@ -395,7 +395,7 @@ Panel::Panel(Args &&args) size.setWidth(st::botWebViewPanelWidthIncreased); } - _widget->setInnerSize(size); + _widget->setInnerSize(size, true); const auto params = _delegate->botThemeParams(); updateColorOverrides(params);