mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Recreate webview on reload request after a crash.
This commit is contained in:
parent
3710d61a09
commit
43eca490a7
1 changed files with 8 additions and 1 deletions
|
@ -533,7 +533,14 @@ bool Panel::showWebview(
|
|||
}, &st::menuIconLeave);
|
||||
}
|
||||
callback(tr::lng_bot_reload_page(tr::now), [=] {
|
||||
_webview->window.reload();
|
||||
if (_webview) {
|
||||
_webview->window.reload();
|
||||
} else if (const auto params = _delegate->botThemeParams()
|
||||
; createWebview(params)) {
|
||||
showWebviewProgress();
|
||||
updateThemeParams(params);
|
||||
_webview->window.navigate(url);
|
||||
}
|
||||
}, &st::menuIconRestore);
|
||||
const auto main = (_menuButtons & MenuButton::RemoveFromMainMenu);
|
||||
if (main || (_menuButtons & MenuButton::RemoveFromMenu)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue