mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Hide webview progress instantly.
This commit is contained in:
parent
c87802ce65
commit
40e46e8480
2 changed files with 10 additions and 7 deletions
|
@ -78,9 +78,6 @@ void Panel::requestActivate() {
|
|||
}
|
||||
|
||||
void Panel::toggleProgress(bool shown) {
|
||||
if (!shown) {
|
||||
_webviewProgress = false;
|
||||
}
|
||||
if (!_progress) {
|
||||
if (!shown) {
|
||||
return;
|
||||
|
@ -435,7 +432,7 @@ void Panel::showEditPaymentMethod(const PaymentMethodDetails &method) {
|
|||
}
|
||||
|
||||
void Panel::showWebviewProgress() {
|
||||
if (_webviewProgress) {
|
||||
if (_webviewProgress && _progress && _progress->shown) {
|
||||
return;
|
||||
}
|
||||
_webviewProgress = true;
|
||||
|
@ -507,7 +504,12 @@ bool Panel::createWebview() {
|
|||
QObject::connect(container.get(), &QObject::destroyed, [=] {
|
||||
if (_webview.get() == raw) {
|
||||
_webview = nullptr;
|
||||
hideWebviewProgress();
|
||||
if (_webviewProgress) {
|
||||
hideWebviewProgress();
|
||||
if (!_progress->shown) {
|
||||
_progress = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_webviewBottom.get() == bottom) {
|
||||
_webviewBottom = nullptr;
|
||||
|
@ -686,7 +688,8 @@ void Panel::showToast(const TextWithEntities &text) {
|
|||
}
|
||||
|
||||
void Panel::showCriticalError(const TextWithEntities &text) {
|
||||
toggleProgress(false);
|
||||
_progress = nullptr;
|
||||
_webviewProgress = false;
|
||||
if (!_weakFormSummary || !_weakFormSummary->showCriticalError(text)) {
|
||||
auto error = base::make_unique_q<PaddingWrap<FlatLabel>>(
|
||||
_widget.get(),
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d7caf94d64aebb6720712150457cfb1c0d5f7ca0
|
||||
Subproject commit 70d10e605b5e4673d76cc56fcb30d8dc60cd9dfe
|
Loading…
Add table
Reference in a new issue