Do not show toggle arrow if link data is still loading
This commit is contained in:
parent
05303e4cf1
commit
e5b3c518e2
@ -146,11 +146,6 @@ export default {
|
||||
this.link.shown = this.link.shown && shouldOpenByDefault;
|
||||
},
|
||||
mounted() {
|
||||
// Don't display previews while they are loading on the server
|
||||
if (this.link.type === "loading") {
|
||||
return;
|
||||
}
|
||||
|
||||
this.$root.$on("resize", this.handleResize);
|
||||
|
||||
this.onPreviewUpdate();
|
||||
@ -165,6 +160,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onPreviewUpdate() {
|
||||
// Don't display previews while they are loading on the server
|
||||
if (this.link.type === "loading") {
|
||||
return;
|
||||
}
|
||||
|
||||
// Error don't have any media to render
|
||||
if (this.link.type === "error") {
|
||||
this.onPreviewReady();
|
||||
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<button
|
||||
v-if="link.type !== 'loading'"
|
||||
:class="['toggle-button', 'toggle-preview', { opened: link.shown }]"
|
||||
@click="onClick" />
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user