Skip to content

Commit

Permalink
move notes list refresh interval to central config
Browse files Browse the repository at this point in the history
  • Loading branch information
korelstar committed Jul 13, 2020
1 parent 0d28a4f commit 8ecaf39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -154,7 +155,7 @@ export default {
})
.then(() => {
this.loading.notes = false
setTimeout(this.loadNotes, 25000)
setTimeout(this.loadNotes, config.interval.notes.refresh * 1000)
})
},
Expand Down
3 changes: 3 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ export const config = {
autotitle: 2,
refresh: 10,
},
notes: {
refresh: 25,
},
},
}

0 comments on commit 8ecaf39

Please sign in to comment.