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 "../../../../../imports"
|
||||
|
||||
Shared.ImageLoader {
|
||||
id: stickerId
|
||||
visible: contentType === Constants.stickerType
|
||||
width: 140
|
||||
height: this.visible ? 140 : 0
|
||||
source: this.visible ? ("https://ipfs.infura.io/ipfs/" + sticker) : ""
|
||||
Loader {
|
||||
property color color
|
||||
|
||||
id: root
|
||||
active: contentType === Constants.stickerType
|
||||
|
||||
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