🎨 Error notification pops up only once after auto sync fails https://github.com/siyuan-note/siyuan/issues/8096

This commit is contained in:
Liang Ding 2023-04-24 15:44:43 +08:00
parent 44c9fe5321
commit 98e7c29b37
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -578,12 +578,13 @@ func isProviderOnline(byHand bool) (ret bool) {
}
if ret = util.IsOnline(checkURL, skipTlsVerify); !ret {
if !byHand {
autoSyncErrCount++
}
if 1 > autoSyncErrCount || byHand {
util.PushErrMsg(Conf.Language(76)+" (Provider: "+conf.ProviderToStr(Conf.Sync.Provider)+")", 5000)
}
if !byHand {
planSyncAfter(30 * time.Second)
autoSyncErrCount++
}
}
return
}