Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-01-09 14:14:29 +0300
committernpmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>2020-01-09 14:20:01 +0300
commit35d2914ec2252fe453045eea8cf33063ea6a39e3 (patch)
treea73d1b1d018f53d415da850592fcb4b796dc5e25 /src
parent83d7d43cb5bb0ad57a0319c52c7af3bd51a56b71 (diff)
Update viewer file list when cycling through
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/components/File.vue6
-rw-r--r--src/views/Timeline.vue10
2 files changed, 11 insertions, 5 deletions
diff --git a/src/components/File.vue b/src/components/File.vue
index 9a7cd8b9..9ecbe85f 100644
--- a/src/components/File.vue
+++ b/src/components/File.vue
@@ -82,6 +82,10 @@ export default {
type: Array,
required: true,
},
+ loadMore: {
+ type: Function,
+ default: () => ([]),
+ },
},
data() {
@@ -115,7 +119,7 @@ export default {
methods: {
openViewer() {
- OCA.Viewer.open(this.filename, this.list)
+ OCA.Viewer.open({ path: this.filename, list: this.list, loadMore: this.loadMore })
},
onLoad() {
this.loaded = true
diff --git a/src/views/Timeline.vue b/src/views/Timeline.vue
index 6aa68ab6..812307e5 100644
--- a/src/views/Timeline.vue
+++ b/src/views/Timeline.vue
@@ -131,9 +131,6 @@ export default {
// cancel any pending requests
this.cancelRequest('Changed view')
- // close any potential opened viewer
- OCA.Viewer.close()
-
// if we don't already have some cached data let's show a loader
if (this.timeline.length === 0) {
this.$emit('update:loading', true)
@@ -161,6 +158,9 @@ export default {
console.debug('We loaded the last page')
this.done = true
}
+
+ // return for the viewer loadMore method
+ return files
} catch (error) {
if (error.response && error.response.status) {
if (error.response.status === 404) {
@@ -190,7 +190,9 @@ export default {
* @returns {Object}
*/
getProps(item) {
- return item
+ return Object.assign({}, item, {
+ loadMore: this.fetchContent,
+ })
},
/**