2020-07-15 17:04:14 -04:00
|
|
|
import QtQuick 2.3
|
2021-08-30 14:42:11 +02:00
|
|
|
import "../../shared" as Shared
|
|
|
|
import "../../imports"
|
2020-07-15 17:04:14 -04:00
|
|
|
|
2020-09-30 13:49:14 -04:00
|
|
|
Loader {
|
|
|
|
property color color
|
2020-12-08 10:38:53 +11:00
|
|
|
property int contentType: -1
|
2021-04-23 11:49:05 -04:00
|
|
|
property string stickerData: sticker
|
|
|
|
property int imageHeight: 140
|
|
|
|
property int imageWidth: 140
|
2021-08-30 14:42:11 +02:00
|
|
|
signal loaded()
|
2020-09-30 13:49:14 -04:00
|
|
|
|
|
|
|
id: root
|
|
|
|
active: contentType === Constants.stickerType
|
|
|
|
|
|
|
|
sourceComponent: Component {
|
|
|
|
Shared.ImageLoader {
|
|
|
|
color: root.color
|
2021-08-30 14:42:11 +02:00
|
|
|
onLoaded: root.loaded()
|
2020-10-20 10:15:04 -04:00
|
|
|
|
2021-04-23 11:49:05 -04:00
|
|
|
width: imageWidth
|
|
|
|
height: this.visible ? imageHeight : 0
|
|
|
|
source: this.visible ? ("https://ipfs.infura.io/ipfs/" + stickerData) : ""
|
2020-09-30 13:49:14 -04:00
|
|
|
}
|
|
|
|
}
|
2020-07-15 17:04:14 -04:00
|
|
|
}
|