perf(overview): Disable canvas first-time render (#1029)

This commit is contained in:
Rémi Marseault 2023-08-08 10:22:19 +02:00 committed by GitHub
parent e26f0d0f6a
commit d679ad4c3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@
{{ $t('modals.detail.pageOverview.waitingForMetadata') }}
</span>
</div>
<div v-else>
<div v-else-if="!shouldRenderPieceStates">
<canvas id="pieceStates" width="0" height="1" />
</div>
<div v-if="!isFetchingMetadata && !shouldRenderPieceStates">
@ -182,7 +182,9 @@ export default defineComponent({
async mounted() {
await this.getTorrentProperties()
await this.updateSelectedFiles()
await this.renderTorrentPieceStates()
if (this.shouldRenderPieceStates) {
await this.renderTorrentPieceStates()
}
},
computed: {
...mapState(['webuiSettings']),