2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Recreate webview on reload request after a crash.

This commit is contained in:
John Preston
2024-01-17 10:16:12 +04:00
parent 3710d61a09
commit 43eca490a7

View File

@@ -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)) {