refactor: make Sticker a Loader so that we only load it if needed
This commit is contained in:
parent
edfd952166
commit
df76fb815b
|
@ -2,10 +2,18 @@ import QtQuick 2.3
|
||||||
import "../../../../../shared" as Shared
|
import "../../../../../shared" as Shared
|
||||||
import "../../../../../imports"
|
import "../../../../../imports"
|
||||||
|
|
||||||
Shared.ImageLoader {
|
Loader {
|
||||||
id: stickerId
|
property color color
|
||||||
visible: contentType === Constants.stickerType
|
|
||||||
width: 140
|
id: root
|
||||||
height: this.visible ? 140 : 0
|
active: contentType === Constants.stickerType
|
||||||
source: this.visible ? ("https://ipfs.infura.io/ipfs/" + sticker) : ""
|
|
||||||
|
sourceComponent: Component {
|
||||||
|
Shared.ImageLoader {
|
||||||
|
color: root.color
|
||||||
|
width: 140
|
||||||
|
height: this.visible ? 140 : 0
|
||||||
|
source: this.visible ? ("https://ipfs.infura.io/ipfs/" + sticker) : ""
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue