fix: restored community links old unfurling (#11988)

This commit is contained in:
Igor Sirotin 2023-08-23 16:35:34 +03:00 committed by GitHub
parent 0ef1001825
commit 7c48447d50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 17 deletions

View File

@ -326,17 +326,12 @@ ColumnLayout {
name: "loadImage"
when: tempLoader.unfurl && tempLoader.isImage
PropertyChanges { target: tempLoader; sourceComponent: unfurledImageComponent }
},
State {
name: "statusInvitation"
when: tempLoader.unfurl && tempLoader.isStatusDeepLink
PropertyChanges { target: tempLoader; sourceComponent: invitationBubble }
}
// State {
// name: "loadLinkPreview"
// when: unfurl && !isImage && !isStatusDeepLink
// PropertyChanges { target: tempLoader; sourceComponent: unfurledLinkComponent }
// },
// State {
// name: "statusInvitation"
// when: unfurl && isStatusDeepLink
// PropertyChanges { target: tempLoader; sourceComponent: invitationBubble }
// }
]
}
}
@ -453,7 +448,4 @@ ColumnLayout {
}
}
}
}

View File

@ -71,10 +71,12 @@ Loader {
return []
const separator = " "
const arr = links.split(separator)
const filtered = arr.filter(v => v.toLowerCase().endsWith('.gif'))
const out = filtered.join(separator)
console.log(`<<<${arr}->${out}`)
return out
const filtered = arr.filter(v => {
const u = v.toLowerCase()
return u.endsWith('.gif')
|| u.includes(Constants.externalStatusLink)
})
return filtered.join(separator)
}
property string responseToMessageWithId: ""