mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
♻️ Remove unused param
This commit is contained in:
parent
388e9cdf03
commit
334ad6b42e
3 changed files with 8 additions and 13 deletions
|
|
@ -58,7 +58,7 @@ func performSync(c *gin.Context) {
|
|||
}
|
||||
|
||||
if 3 != model.Conf.Sync.Mode {
|
||||
model.SyncData(false, false, true)
|
||||
model.SyncData(true)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
|
|||
if !force {
|
||||
if Conf.Sync.Enabled && 3 != Conf.Sync.Mode &&
|
||||
((IsSubscriber() && conf.ProviderSiYuan == Conf.Sync.Provider) || conf.ProviderSiYuan != Conf.Sync.Provider) {
|
||||
syncData(false, true, false)
|
||||
syncData(true, false)
|
||||
if 0 != ExitSyncSucc {
|
||||
exitCode = 1
|
||||
return
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ func SyncDataJob() {
|
|||
return
|
||||
}
|
||||
|
||||
SyncData(false, false, false)
|
||||
SyncData(false)
|
||||
}
|
||||
|
||||
func BootSyncData() {
|
||||
|
|
@ -170,19 +170,19 @@ func BootSyncData() {
|
|||
return
|
||||
}
|
||||
|
||||
func SyncData(boot, exit, byHand bool) {
|
||||
syncData(boot, exit, byHand)
|
||||
func SyncData(byHand bool) {
|
||||
syncData(false, byHand)
|
||||
}
|
||||
|
||||
func syncData(boot, exit, byHand bool) {
|
||||
func syncData(exit, byHand bool) {
|
||||
defer logging.Recover()
|
||||
|
||||
if !checkSync(boot, exit, byHand) {
|
||||
if !checkSync(false, exit, byHand) {
|
||||
return
|
||||
}
|
||||
|
||||
util.BroadcastByType("main", "syncing", 0, Conf.Language(81), nil)
|
||||
if !isProviderOnline() { // 这个操作比较耗时,所以要先推送 syncing 事件后再判断网络,这样才能给用户更即时的反馈
|
||||
if !exit && !isProviderOnline() { // 这个操作比较耗时,所以要先推送 syncing 事件后再判断网络,这样才能给用户更即时的反馈
|
||||
util.BroadcastByType("main", "syncing", 2, Conf.Language(28), nil)
|
||||
return
|
||||
}
|
||||
|
|
@ -190,11 +190,6 @@ func syncData(boot, exit, byHand bool) {
|
|||
syncLock.Lock()
|
||||
defer syncLock.Unlock()
|
||||
|
||||
if boot {
|
||||
util.IncBootProgress(3, "Syncing data from the cloud...")
|
||||
BootSyncSucc = 0
|
||||
logging.LogInfof("sync before boot")
|
||||
}
|
||||
if exit {
|
||||
ExitSyncSucc = 0
|
||||
logging.LogInfof("sync before exit")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue