From c7a7206fd0b5bd6e85770dd8fcbc172a22a0eb73 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Tue, 21 May 2024 12:11:59 +0200 Subject: [PATCH] fix to open share urls from preview with files app The wrong context was passed, so the overwritten startActivity in ChatActivity was not called. Signed-off-by: Marcel Hibbe --- .../adapters/messages/IncomingLinkPreviewMessageViewHolder.kt | 2 +- .../adapters/messages/OutcomingLinkPreviewMessageViewHolder.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLinkPreviewMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLinkPreviewMessageViewHolder.kt index a8b47572e..9f2117c91 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLinkPreviewMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/IncomingLinkPreviewMessageViewHolder.kt @@ -98,7 +98,7 @@ class IncomingLinkPreviewMessageViewHolder(incomingView: View, payload: Any) : message, ncApi, binding.referenceInclude, - context + itemView.context ) binding.referenceInclude.referenceWrapper.setOnLongClickListener { l: View? -> commonMessageInterface.onOpenMessageActionsDialog(message) diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLinkPreviewMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLinkPreviewMessageViewHolder.kt index 4a763a496..567f3936c 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLinkPreviewMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/OutcomingLinkPreviewMessageViewHolder.kt @@ -109,7 +109,7 @@ class OutcomingLinkPreviewMessageViewHolder(outcomingView: View, payload: Any) : message, ncApi, binding.referenceInclude, - context + itemView.context ) binding.referenceInclude.referenceWrapper.setOnLongClickListener { l: View? -> commonMessageInterface.onOpenMessageActionsDialog(message)