Another try: destroy recycler completely

pull/37/head
Varun Patil 2022-09-12 22:44:09 -07:00
parent 2b212543d5
commit 0a648d27f1
4 changed files with 5 additions and 16 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -20,7 +20,6 @@
height: rowHeight + 'px',
}">
<img
ref="image"
:src="getSrc()"
:key="data.fileid"
@ -38,7 +37,7 @@
</template>
<script lang="ts">
import { Component, Prop, Emit, Mixins, Watch } from 'vue-property-decorator';
import { Component, Prop, Emit, Mixins } from 'vue-property-decorator';
import { IDay, IPhoto } from "../types";
import * as dav from "../services/DavRequests";
@ -78,17 +77,6 @@ export default class Photo extends Mixins(GlobalMixin) {
return getPreviewUrl(this.data.fileid, this.data.etag);
}
@Watch('state')
stateChange() {
// Check if current image already loaded
if (this.data?.fileid) {
const img = this.$refs.image as HTMLImageElement;
if (img.complete && img.src === this.getUrl()) {
this.load();
}
}
}
/** Image loaded successfully */
load() {
this.data.flag |= this.c.FLAG_LOADED;

View File

@ -2,6 +2,7 @@
<div class="container" ref="container" :class="{ 'icon-loading': loading }">
<!-- Main recycler view for rows -->
<RecycleScroller
v-if="list.length > 0"
ref="recycler"
class="recycler"
:items="list"