mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 23:17:13 +03:00
QuotaInfo: make sure that we always check the quota every 30 seconds
This commit is contained in:
parent
236951d9b3
commit
51c10de672
1 changed files with 3 additions and 3 deletions
|
@ -50,11 +50,11 @@ void QuotaInfo::setActive(bool active)
|
|||
void QuotaInfo::slotAccountStateChanged()
|
||||
{
|
||||
if (canGetQuota()) {
|
||||
if (_lastQuotaRecieved.isNull()
|
||||
|| _lastQuotaRecieved.msecsTo(QDateTime::currentDateTime()) > defaultIntervalT) {
|
||||
auto elapsed = _lastQuotaRecieved.msecsTo(QDateTime::currentDateTime());
|
||||
if (_lastQuotaRecieved.isNull() || elapsed >= defaultIntervalT) {
|
||||
slotCheckQuota();
|
||||
} else {
|
||||
_jobRestartTimer.start(defaultIntervalT);
|
||||
_jobRestartTimer.start(defaultIntervalT - elapsed);
|
||||
}
|
||||
} else {
|
||||
_jobRestartTimer.stop();
|
||||
|
|
Loading…
Reference in a new issue