File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,6 +125,13 @@ export const SETTINGS_SCHEMA: SettingSchemaDesc[] = [
125125 default : true ,
126126 description : 'Check status when DB changed, restart logseq to take effect' ,
127127 } ,
128+ {
129+ key : 'autoCheckSynced' ,
130+ title : 'Auto Check If Synced' ,
131+ type : 'boolean' ,
132+ default : false ,
133+ description : 'Automatically check if the local version is the same as the remote' ,
134+ } ,
128135 {
129136 key : 'autoPush' ,
130137 title : 'Auto Push' ,
Original file line number Diff line number Diff line change @@ -109,15 +109,15 @@ if (isDevelopment) {
109109 } )
110110 }
111111
112- checkIsSynced ( )
112+ if ( logseq . settings ?. autoCheckSynced ) checkIsSynced ( )
113113 checkStatusWithDebounce ( )
114114
115115 if ( top ) {
116116 top . document ?. addEventListener ( 'visibilitychange' , async ( ) => {
117117 const visibilityState = top ?. document ?. visibilityState
118118
119119 if ( visibilityState === 'visible' ) {
120- checkIsSynced ( )
120+ if ( logseq . settings ?. autoCheckSynced ) checkIsSynced ( )
121121 } else if ( visibilityState === 'hidden' ) {
122122 // logseq.UI.showMsg(`Page is hidden: ${new Date()}`, 'success', { timeout: 0 })
123123 // noChange void
You can’t perform that action at this time.
0 commit comments