Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions cypress/e2e/shared_albums.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ describe('Manage shared albums', () => {
})

it('Remove collaborator from an album', () => {
cy.get('ul.collections__list li')
.should('contain', `shared_album_test4 (${alice})`)
cy.get(`[data-test="shared_album_test4 (${alice})"]`).should('have.length', 1)

cy.logout()
cy.login(alice, 'password', '/apps/photos')
Expand Down Expand Up @@ -178,10 +177,8 @@ describe('Manage shared albums', () => {


it('It should display two shared albums', () => {
cy.get('ul.collections__list li')
.contains(`shared_album_test5 (${alice})`)
cy.get('ul.collections__list li')
.contains(`shared_album_test5 (${charlie})`)
cy.get(`[data-test="shared_album_test5 (${alice})"]`).should('have.length', 1)
cy.get(`[data-test="shared_album_test5 (${charlie})"]`).should('have.length', 1)
})
})
})
191 changes: 0 additions & 191 deletions cypress/e2e/shared_albums.cy.ts

This file was deleted.

4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_components_FilesPicker_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_components_FilesPicker_vue.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_AlbumContent_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_views_AlbumContent_vue.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_Timeline_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_views_Timeline_vue.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/components/FilesPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
:context="uploadContext"
:destination="photosLocation"
:multiple="true"
@uploaded="getFiles" />
@uploaded="refreshFiles" />
<NcButton type="primary" :disabled="loading || selectedFileIds.length === 0" @click="emitPickedEvent">
<template #icon>
<ImagePlus v-if="!loading" />
Expand Down Expand Up @@ -172,6 +172,10 @@ export default {
this.fetchFiles('', {}, this.blacklistIds)
},

refreshFiles() {
this.fetchFiles('', { firstResult: 0 }, [...this.blacklistIds, ...this.fetchedFileIds], true)
},

emitPickedEvent() {
this.$emit('files-picked', this.selectedFileIds)
},
Expand Down
5 changes: 3 additions & 2 deletions src/mixins/FetchFilesMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ export default {
* @param {string} path - Path to pass to getPhotos.
* @param {object} options - Options to pass to getPhotos.
* @param {string[]} [blacklist=[]] - Array of ids to filter out.
* @param {boolean} [force=false] - Force fetching even if doneFetchingFiles is true
* @return {Promise<string[]>} - The next batch of data depending on global offset.
*/
async fetchFiles(path = '', options = {}, blacklist = []) {
if (this.doneFetchingFiles || this.loadingFiles) {
async fetchFiles(path = '', options = {}, blacklist = [], force = false) {
if ((this.doneFetchingFiles && !force) || this.loadingFiles) {
return []
}

Expand Down