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());