Added timeout to fetch user totals which prevents

Duplicate calls which would be really annoying
This commit is contained in:
Max
2022-12-22 01:59:27 +00:00
parent 0202d1acda
commit 48c1fa8e69
3 changed files with 28 additions and 18 deletions

View File

@@ -127,7 +127,7 @@
:data="note"
:title-view="titleView || isFloatingList"
:currently-open="openNotes.includes(note.id)"
:key="note.id + note.color + '-' +note.title.length + '-' +note.subtext.length + '-' + note.tag_count + note.updated"
:key="note.id + note.color + '-' +note.title.length + '-' +note.subtext.length + '-' + note.tag_count + note.updated + note.archived + note.pinned + note.trashed"
/>
</div>
</div>
@@ -564,16 +564,20 @@
// @TODO Don't even trigger this if the note wasn't changed
updateSingleNote(noteId, focuseAndAnimate = true){
console.log('updating single note', noteId)
noteId = parseInt(noteId)
//Find local note, if it exists; continue
let note = null
if(this.$refs['note-'+noteId] && this.$refs['note-'+noteId][0] && this.$refs['note-'+noteId][0].note){
if(this.$refs['note-'+noteId]?.[0]?.note){
note = this.$refs['note-'+noteId][0].note
//Show that note is working on updating
this.$refs['note-'+noteId][0].showWorking = true
}
this.rebuildNoteCategorise()
// return
//Lookup one note using passed in ID
const postData = {