perf(chatScroll): Fix image loading from https url and raw data

perf(chatScroll): Fix comments on Fix image loading from https url and raw data
This commit is contained in:
Alex Jbanca 2023-01-10 14:05:51 +02:00 committed by Alex Jbanca
parent 6c76026d53
commit 2723ef1293
1 changed files with 7 additions and 2 deletions

View File

@ -13,8 +13,13 @@ Image {
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
onIconChanged: { onIconChanged: {
if (icon !== "") { if(icon.startsWith("data:image/") || icon.startsWith("https://")) {
source = "../../assets/img/icons/" + icon + ".svg"; //raw image data
source = icon
objectName = "custom-icon"
}
else if (icon !== "") {
source = "../../assets/img/icons/" + icon+ ".svg";
objectName = icon + "-icon" objectName = icon + "-icon"
} }
} }