1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

SiteSettingsView Add delay for reloading same site

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2024-08-05 21:09:59 +02:00
parent 2c299c6e0b
commit 1f5e256e5a
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B

View File

@ -265,6 +265,17 @@ QBrush SiteSettingsView_Widget::permissionColor(SiteSettingsManager::Permission
void SiteSettingsView_Widget::loadFinished(WebPage* page) void SiteSettingsView_Widget::loadFinished(WebPage* page)
{ {
static qint64 latestRun = 0;
static WebPage* latestPage = nullptr;
qint64 currentRun = QDateTime::currentMSecsSinceEpoch();
if ((latestPage == page) && ((currentRun - latestRun) < 200)) {
return;
}
latestRun = currentRun;
latestPage = page;
auto *tab = m_window->tabWidget()->webTab(); auto *tab = m_window->tabWidget()->webTab();
if (tab == nullptr) { if (tab == nullptr) {
return; return;