Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions webview/webview_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <QtCore/QPointer>
#include <QtCore/QCoreApplication>

#include "rpl/take.h"

Comment on lines +29 to 30

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there should be no need to include this, rpl is usually completely included

Suggested change
#include "rpl/take.h"

#include <memory>

namespace Webview {
Expand Down Expand Up @@ -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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
) | rpl::take(1) | rpl::on_next([=](int height) {
) | rpl::on_next([=] {
const auto height = container->resizeGetHeight(st::boxWideWidth);

raw->setInnerSize({ st::boxWideWidth, titleHeight + height });
}, container->lifetime());

Expand Down Expand Up @@ -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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
) | rpl::take(1) | rpl::on_next([=](int height) {
) | rpl::on_next([=] {
const auto height = container->resizeGetHeight(st::boxWideWidth);

raw->setInnerSize({ st::boxWideWidth, titleHeight + height });
}, container->lifetime());

Expand Down