mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-24 06:00:49 +01:00
avoid to set link preview content from wrong message
there was a report that a message contained the link preview of a previous message. This was most likely because of a recycler view error. Hopefully setting empty values should avoid this now. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
f74ad91fd8
commit
e869108ac7
@ -44,6 +44,11 @@ class LinkPreview {
|
|||||||
binding: ReferenceInsideMessageBinding,
|
binding: ReferenceInsideMessageBinding,
|
||||||
context: Context
|
context: Context
|
||||||
) {
|
) {
|
||||||
|
binding.referenceName.text = ""
|
||||||
|
binding.referenceDescription.text = ""
|
||||||
|
binding.referenceLink.text = ""
|
||||||
|
binding.referenceThumbImage.controller = null
|
||||||
|
|
||||||
if (!message.extractedUrlToPreview.isNullOrEmpty()) {
|
if (!message.extractedUrlToPreview.isNullOrEmpty()) {
|
||||||
val credentials: String = ApiUtils.getCredentials(message.activeUser?.username, message.activeUser?.token)
|
val credentials: String = ApiUtils.getCredentials(message.activeUser?.username, message.activeUser?.token)
|
||||||
val openGraphLink = ApiUtils.getUrlForOpenGraph(message.activeUser?.baseUrl)
|
val openGraphLink = ApiUtils.getUrlForOpenGraph(message.activeUser?.baseUrl)
|
||||||
|
Loading…
Reference in New Issue
Block a user