Browse Source

fix: Resolve code linting issues

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Ferdinand Thiessen 10 months ago
parent
commit
4c306a3a55
2 changed files with 17 additions and 16 deletions
  1. 8 7
      apps/files/src/views/FilesList.vue
  2. 9 9
      core/src/views/UnifiedSearch.vue

+ 8 - 7
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

+ 9 - 9
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)
+					}
 				}
 			}