fix: account auto sync time

This commit is contained in:
Qu Xuan
2021-03-29 11:04:11 +08:00
parent 7cdda78b24
commit 6b89fb57ee
+3
View File
@@ -1829,6 +1829,9 @@ func (account *SCloudaccount) needSync() bool {
if time.Now().Sub(account.LastSyncEndAt) > time.Duration(account.getSyncIntervalSeconds())*time.Second {
return true
}
if account.EnableAutoSync && !account.LastAutoSync.IsZero() && time.Now().Sub(account.LastAutoSync) > time.Duration(account.getSyncIntervalSeconds()-1)*time.Second {
return true
}
return false
}