Hide webview progress instantly.
This commit is contained in:
parent
c87802ce65
commit
40e46e8480
|
@ -78,9 +78,6 @@ void Panel::requestActivate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Panel::toggleProgress(bool shown) {
|
void Panel::toggleProgress(bool shown) {
|
||||||
if (!shown) {
|
|
||||||
_webviewProgress = false;
|
|
||||||
}
|
|
||||||
if (!_progress) {
|
if (!_progress) {
|
||||||
if (!shown) {
|
if (!shown) {
|
||||||
return;
|
return;
|
||||||
|
@ -435,7 +432,7 @@ void Panel::showEditPaymentMethod(const PaymentMethodDetails &method) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Panel::showWebviewProgress() {
|
void Panel::showWebviewProgress() {
|
||||||
if (_webviewProgress) {
|
if (_webviewProgress && _progress && _progress->shown) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_webviewProgress = true;
|
_webviewProgress = true;
|
||||||
|
@ -507,7 +504,12 @@ bool Panel::createWebview() {
|
||||||
QObject::connect(container.get(), &QObject::destroyed, [=] {
|
QObject::connect(container.get(), &QObject::destroyed, [=] {
|
||||||
if (_webview.get() == raw) {
|
if (_webview.get() == raw) {
|
||||||
_webview = nullptr;
|
_webview = nullptr;
|
||||||
|
if (_webviewProgress) {
|
||||||
hideWebviewProgress();
|
hideWebviewProgress();
|
||||||
|
if (!_progress->shown) {
|
||||||
|
_progress = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_webviewBottom.get() == bottom) {
|
if (_webviewBottom.get() == bottom) {
|
||||||
_webviewBottom = nullptr;
|
_webviewBottom = nullptr;
|
||||||
|
@ -686,7 +688,8 @@ void Panel::showToast(const TextWithEntities &text) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Panel::showCriticalError(const TextWithEntities &text) {
|
void Panel::showCriticalError(const TextWithEntities &text) {
|
||||||
toggleProgress(false);
|
_progress = nullptr;
|
||||||
|
_webviewProgress = false;
|
||||||
if (!_weakFormSummary || !_weakFormSummary->showCriticalError(text)) {
|
if (!_weakFormSummary || !_weakFormSummary->showCriticalError(text)) {
|
||||||
auto error = base::make_unique_q<PaddingWrap<FlatLabel>>(
|
auto error = base::make_unique_q<PaddingWrap<FlatLabel>>(
|
||||||
_widget.get(),
|
_widget.get(),
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit d7caf94d64aebb6720712150457cfb1c0d5f7ca0
|
Subproject commit 70d10e605b5e4673d76cc56fcb30d8dc60cd9dfe
|
Loading…
Reference in New Issue