From c843d916894c1eac2581cbdf291d8f14f6699488 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Thu, 14 May 2020 11:15:15 +0200 Subject: [PATCH] Copied to clipboard: toast instead of snack Snackbar overlays typing area, this reduces productivity! --- .../riotx/features/home/room/detail/RoomDetailFragment.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 f147072060..c138fbc6b3 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 @@ -1217,7 +1217,8 @@ class RoomDetailFragment @Inject constructor( is EventSharedAction.Copy -> { // I need info about the current selected message :/ copyToClipboard(requireContext(), action.content, false) - showSnackWithMessage(getString(R.string.copied_to_clipboard), Snackbar.LENGTH_SHORT) + //showSnackWithMessage(getString(R.string.copied_to_clipboard), Snackbar.LENGTH_SHORT) + context?.toast(getString(R.string.copied_to_clipboard)) } is EventSharedAction.Redact -> { promptConfirmationToRedactEvent(action) @@ -1261,7 +1262,8 @@ class RoomDetailFragment @Inject constructor( is EventSharedAction.CopyPermalink -> { val permalink = PermalinkFactory.createPermalink(roomDetailArgs.roomId, action.eventId) copyToClipboard(requireContext(), permalink, false) - showSnackWithMessage(getString(R.string.copied_to_clipboard), Snackbar.LENGTH_SHORT) + //showSnackWithMessage(getString(R.string.copied_to_clipboard), Snackbar.LENGTH_SHORT) + context?.toast(getString(R.string.copied_to_clipboard)) } is EventSharedAction.Resend -> { roomDetailViewModel.handle(RoomDetailAction.ResendMessage(action.eventId))