diff options
-rw-r--r-- | apps/files/src/views/FilesList.vue | 15 | ||||
-rw-r--r-- | core/src/views/UnifiedSearch.vue | 18 |
2 files changed, 17 insertions, 16 deletions
diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index fbf2eb227c1..1a7ca5769aa 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -287,14 +287,15 @@ export default Vue.extend({ // If we're in the root dir, define the root if (dir === '/') { this.filesStore.setRoot({ service: currentView.id, root: folder }) - } else - // Otherwise, add the folder to the store - if (folder.fileid) { - this.filesStore.updateNodes([folder]) - this.pathsStore.addPath({ service: currentView.id, fileid: folder.fileid, path: dir }) } else { - // If we're here, the view API messed up - logger.error('Invalid root folder returned', { dir, folder, currentView }) + // Otherwise, add the folder to the store + if (folder.fileid) { + this.filesStore.updateNodes([folder]) + this.pathsStore.addPath({ service: currentView.id, fileid: folder.fileid, path: dir }) + } else { + // If we're here, the view API messed up + logger.error('Invalid root folder returned', { dir, folder, currentView }) + } } // Update paths store diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue index baa12f52e5d..95be2dd335f 100644 --- a/core/src/views/UnifiedSearch.vue +++ b/core/src/views/UnifiedSearch.vue @@ -596,16 +596,16 @@ export default { if (data.ocs.data.entries.length < this.defaultLimit) { this.$set(this.reached, type, true) } - } else + } else { + // If no cursor, we might have all the results already, + // let's fake pagination and show the next xxx entries + if (this.limits[type] && this.limits[type] >= 0) { + this.limits[type] += this.defaultLimit - // If no cursor, we might have all the results already, - // let's fake pagination and show the next xxx entries - if (this.limits[type] && this.limits[type] >= 0) { - this.limits[type] += this.defaultLimit - - // Check if we reached end of pagination - if (this.limits[type] >= this.results[type].length) { - this.$set(this.reached, type, true) + // Check if we reached end of pagination + if (this.limits[type] >= this.results[type].length) { + this.$set(this.reached, type, true) + } } } |