From 35229882e3e731e6b8e3da4429a2427550f960fb Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 7 Aug 2019 12:28:21 +0200 Subject: [PATCH] Fix `(edited)` link can be copied to clipboard (#402) --- CHANGES.md | 3 ++- .../riotx/features/home/room/detail/RoomDetailFragment.kt | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 6513f9d3..b42deef9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,7 +19,8 @@ Bugfix: - Close detail room screen when the room is left with another client (#256) - Clear notification for a room left on another client - Fix messages with empty `in_reply_to` not rendering (#447) - - Fix clear cache (#408) and Logout (#205 ) + - Fix clear cache (#408) and Logout (#205) + - Fix `(edited)` link can be copied to clipboard (#402) Translations: - diff --git a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt index a277f9a5..02e1edb6 100644 --- a/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/home/room/detail/RoomDetailFragment.kt @@ -694,8 +694,10 @@ class RoomDetailFragment : } override fun onUrlLongClicked(url: String): Boolean { - // Copy the url to the clipboard - copyToClipboard(requireContext(), url, true, R.string.link_copied_to_clipboard) + if (url != getString(R.string.edited_suffix)) { + // Copy the url to the clipboard + copyToClipboard(requireContext(), url, true, R.string.link_copied_to_clipboard) + } return true }