From 3831945564916b17602be37ede42dffa6cdb1dbd Mon Sep 17 00:00:00 2001 From: NEOLAX Date: Fri, 31 Jul 2026 17:41:06 +0300 Subject: [PATCH] Fix WebView dialog size feedback loop --- webview/webview_dialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webview/webview_dialog.cpp b/webview/webview_dialog.cpp index fe25c20..7729255 100644 --- a/webview/webview_dialog.cpp +++ b/webview/webview_dialog.cpp @@ -26,6 +26,8 @@ #include #include +#include "rpl/take.h" + #include namespace Webview { @@ -242,7 +244,7 @@ PopupResult ShowBlockingPopup(PopupArgs &&args) { container->resizeToWidth(st::boxWideWidth); container->heightValue( - ) | rpl::on_next([=](int height) { + ) | rpl::take(1) | rpl::on_next([=](int height) { raw->setInnerSize({ st::boxWideWidth, titleHeight + height }); }, container->lifetime()); @@ -469,7 +471,7 @@ void ShowPopupAsync( container->resizeToWidth(st::boxWideWidth); container->heightValue( - ) | rpl::on_next([=](int height) { + ) | rpl::take(1) | rpl::on_next([=](int height) { raw->setInnerSize({ st::boxWideWidth, titleHeight + height }); }, container->lifetime());