Copied to clipboard: toast instead of snack

Snackbar overlays typing area, this reduces productivity!
This commit is contained in:
SpiritCroc 2020-05-14 11:15:15 +02:00
parent 4679ab0e79
commit c843d91689
1 changed files with 4 additions and 2 deletions

View File

@ -1217,7 +1217,8 @@ class RoomDetailFragment @Inject constructor(
is EventSharedAction.Copy -> { is EventSharedAction.Copy -> {
// I need info about the current selected message :/ // I need info about the current selected message :/
copyToClipboard(requireContext(), action.content, false) 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 -> { is EventSharedAction.Redact -> {
promptConfirmationToRedactEvent(action) promptConfirmationToRedactEvent(action)
@ -1261,7 +1262,8 @@ class RoomDetailFragment @Inject constructor(
is EventSharedAction.CopyPermalink -> { is EventSharedAction.CopyPermalink -> {
val permalink = PermalinkFactory.createPermalink(roomDetailArgs.roomId, action.eventId) val permalink = PermalinkFactory.createPermalink(roomDetailArgs.roomId, action.eventId)
copyToClipboard(requireContext(), permalink, false) 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 -> { is EventSharedAction.Resend -> {
roomDetailViewModel.handle(RoomDetailAction.ResendMessage(action.eventId)) roomDetailViewModel.handle(RoomDetailAction.ResendMessage(action.eventId))