move notes list refresh interval to central config

This commit is contained in:
korelstar 2020-07-12 22:49:43 +02:00
parent 0d28a4f2bb
commit 8ecaf396eb
2 changed files with 5 additions and 1 deletions

View File

@ -47,6 +47,7 @@ import {
import { showSuccess } from '@nextcloud/dialogs'
import { emit } from '@nextcloud/event-bus'
import { config } from './config'
import { fetchNotes, noteExists, createNote, undoDeleteNote } from './NotesService'
import AppSettings from './components/AppSettings'
import NavigationList from './components/NavigationList'
@ -154,7 +155,7 @@ export default {
})
.then(() => {
this.loading.notes = false
setTimeout(this.loadNotes, 25000)
setTimeout(this.loadNotes, config.interval.notes.refresh * 1000)
})
},

View File

@ -5,5 +5,8 @@ export const config = {
autotitle: 2,
refresh: 10,
},
notes: {
refresh: 25,
},
},
}