fix: account auto sync time

This commit is contained in:
Qu Xuan
2021-03-29 11:22:28 +08:00
parent 8eb81fdda9
commit 0a81e8a54d
+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
}