Bugfix Batch

* Animations disabled on remote events, closing note still triggers animation for local user
* Created save icons to fix display on mobile
* Hidden URLs are hidden until note is deleted or URL is removed from note
* Tags search all categories, but probably not trash
* Back to all notes button clears search
* Deleted Notes are removed from search index
This commit is contained in:
Max G
2020-05-19 03:38:43 +00:00
parent 5096e74a60
commit 543ecf0f2d
8 changed files with 58 additions and 45 deletions

View File

@@ -218,7 +218,8 @@
'sent': ['paper plane outline', 'Shared Notes'],
'notes': ['file','Notes'],
'highlights': ['paragraph', 'Found In Text'],
'trashed': ['poop', 'Trashed Notes']
'trashed': ['poop', 'Trashed Notes'],
'tagged': ['tag', 'Tagged'],
},
noteSections: {
pinned: [],
@@ -227,7 +228,8 @@
sent:[],
notes: [],
highlights: [],
trashed: []
trashed: [],
tagged:[],
},
}
@@ -241,7 +243,7 @@
//Do not update note if its open
if(this.activeNoteId1 != noteId){
this.$store.dispatch('fetchAndUpdateUserTotals')
this.updateSingleNote(noteId)
this.updateSingleNote(noteId, false)
}
})
@@ -249,7 +251,7 @@
//Do not update note if its open
if(this.activeNoteId1 != noteId){
this.$store.dispatch('fetchAndUpdateUserTotals')
this.updateSingleNote(noteId)
this.updateSingleNote(noteId, false)
}
})
@@ -258,7 +260,7 @@
//Do not update note if its open
if(this.activeNoteId1 != noteId){
this.updateSingleNote(noteId)
this.updateSingleNote(noteId, false)
}
})
@@ -481,7 +483,7 @@
},
// @TODO Don't even trigger this if the note wasn't changed
updateSingleNote(noteId){
updateSingleNote(noteId, focuseAndAnimate = true){
noteId = parseInt(noteId)
@@ -539,7 +541,7 @@
this.$nextTick( () => {
//Trigger close animation on note
if(this.$refs['note-'+noteId] && this.$refs['note-'+noteId][0]){
if(this.$refs['note-'+noteId] && this.$refs['note-'+noteId][0] && focuseAndAnimate){
this.$refs['note-'+noteId][0].justClosed()
}
})
@@ -662,6 +664,11 @@
//Sort notes into defined sections
notes.forEach(note => {
if(this.searchTags.length >= 1){
this.noteSections.tagged.push(note)
return
}
//Only show trashed notes when trashed
if(this.fastFilters.onlyShowTrashed == 1){
@@ -725,7 +732,7 @@
this.fastFilters = {}
this.updateFastFilters(5)
this.foundAttachments = [] //Remove all attachments
// this.$bus.$emit('reset_fast_filters')
this.$bus.$emit('reset_fast_filters')
//Load initial batch, then tags, then other batch
this.search(true, this.firstLoadBatchSize)
@@ -733,9 +740,6 @@
//Load a larger batch once first batch has loaded
return this.search(false, this.batchSize, true)
})
.then( i => {
//Thats how you promise chain
})
},
updateFastFilters(index){