Skip to content

Commit

Permalink
Merge pull request #3934 from nextcloud/backport/3922/stable-19.0
Browse files Browse the repository at this point in the history
[stable-19.0] Bugfix/3669/fix to open preview links in files app
  • Loading branch information
mahibi authored May 22, 2024
2 parents 556349d + 9a472c8 commit d33ce0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/nextcloud/talk/utils/UriUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class UriUtils {

fun isInstanceInternalFileShareUrl(baseUrl: String, url: String): Boolean {
// https://cloud.nextcloud.com/f/41
return url.startsWith("$baseUrl/f/") || url.startsWith("$baseUrl/index.php/f/") &&
Regex(".*/f/d*").matches(url)
return (url.startsWith("$baseUrl/f/") || url.startsWith("$baseUrl/index.php/f/")) &&
Regex(".*/f/\\d*").matches(url)
}

fun extractInstanceInternalFileShareFileId(url: String): String {
Expand Down

0 comments on commit d33ce0b

Please sign in to comment.