mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
SiteSettingsView Add delay for reloading same site
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
2c299c6e0b
commit
1f5e256e5a
@ -265,6 +265,17 @@ QBrush SiteSettingsView_Widget::permissionColor(SiteSettingsManager::Permission
|
||||
|
||||
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();
|
||||
if (tab == nullptr) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user