@@ -63,6 +63,7 @@ import {
6363import { showError } from ' @nextcloud/dialogs'
6464import { emit } from ' @nextcloud/event-bus'
6565
66+ import { config } from ' ../config'
6667import { fetchNote , refreshNote , saveNote , saveNoteManually , autotitleNote , routeIsNewNote } from ' ../NotesService'
6768import TheEditor from ' ./EditorEasyMDE'
6869import ThePreview from ' ./EditorMarkdownIt'
@@ -244,7 +245,7 @@ export default {
244245 this .refreshTimer = setTimeout (() => {
245246 this .refreshTimer = null
246247 this .refreshNote ()
247- }, 10000 )
248+ }, config . interval . note . refresh * 1000 )
248249 },
249250
250251 refreshNote () {
@@ -273,7 +274,7 @@ export default {
273274 this .autosaveTimer = setTimeout (() => {
274275 this .autosaveTimer = null
275276 saveNote (note .id )
276- }, 2000 )
277+ }, config . interval . note . autosave * 1000 )
277278 }
278279
279280 // (re-) start auto refresh timer
@@ -282,21 +283,17 @@ export default {
282283
283284 // stop old autotitle timer
284285 if (this .autotitleTimer !== null ) {
285- console .debug (' clear autotitle timer' )
286286 clearTimeout (this .autotitleTimer )
287287 this .autotitleTimer = null
288288 }
289289 // start autotitle timer if note is new
290290 if (this .isNewNote ) {
291- console .debug (' start autotitle timer' )
292291 this .autotitleTimer = setTimeout (() => {
293- console .debug (' execute autotitle timer' )
294292 this .autotitleTimer = null
295293 if (this .isNewNote ) {
296- console .debug (' autotitle note' )
297294 autotitleNote (note .id )
298295 }
299- }, 5000 )
296+ }, config . interval . note . autotitle * 1000 )
300297 }
301298 }
302299 },
0 commit comments