Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit c30b4eb

Browse files
feat: a bit better performance to fetch gif on publish screen
1 parent b8fd440 commit c30b4eb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

studio/src/app/components/editor/publish/app-publish-done/app-publish-done.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ app-publish-done {
1616
height: 10rem;
1717

1818
border: 1px solid var(--ion-color-tertiary);
19+
background: rgba(var(--ion-color-tertiary-rgb), 0.4);
1920
box-shadow: 1px 2px 8px 2px rgba(var(--ion-color-tertiary-rgb), 0.2);
2021
}
2122

studio/src/app/components/editor/publish/app-publish-done/app-publish-done.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class AppPublishDone {
2929
this.gifService = GifService.getInstance();
3030
}
3131

32-
async componentDidLoad() {
32+
async componentWillLoad() {
3333
await this.initRandomGifUrl();
3434
}
3535

@@ -63,9 +63,9 @@ export class AppPublishDone {
6363
}
6464

6565
private renderGif() {
66-
if (this.gif && this.gif.media && this.gif.media.length > 0 && this.gif.media[0].tinygif && this.gif.media[0].tinygif.url) {
67-
return <deckgo-lazy-img imgSrc={this.gif.media[0].tinygif.url}
68-
imgAlt={this.gif.title ? this.gif.title : this.gif.media[0].tinygif.url}></deckgo-lazy-img>
66+
if (this.gif && this.gif.media && this.gif.media.length > 0 && this.gif.media[0].nanogif && this.gif.media[0].nanogif.url) {
67+
return <deckgo-lazy-img imgSrc={this.gif.media[0].nanogif.url}
68+
imgAlt={this.gif.title ? this.gif.title : this.gif.media[0].nanogif.url}></deckgo-lazy-img>
6969
} else {
7070
return undefined;
7171
}

0 commit comments

Comments
 (0)