Frontend: Only discard viewer results if offset was 0 #309 #370

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-07-01 11:10:29 +02:00
parent f86a2fe50b
commit 38476248d6
3 changed files with 12 additions and 3 deletions

View file

@ -240,7 +240,10 @@
Photo.search(params).then(response => {
this.results = Photo.mergeResponse(this.results, response);
this.viewer.results = [];
if(offset === 0) {
this.viewer.results = [];
}
this.scrollDisabled = (response.count < count);

View file

@ -275,7 +275,10 @@
Photo.search(params).then(response => {
this.results = Photo.mergeResponse(this.results, response);
this.viewer.results = [];
if(offset === 0) {
this.viewer.results = [];
}
this.scrollDisabled = (response.count < count);

View file

@ -283,7 +283,10 @@
Photo.search(params).then(response => {
this.results = Photo.mergeResponse(this.results, response);
this.viewer.results = [];
if(offset === 0) {
this.viewer.results = [];
}
this.scrollDisabled = (response.count < count);