From 042c57f9b8301b0715b80a9e04a4b3f831748072 Mon Sep 17 00:00:00 2001 From: Maxime Naturel Date: Wed, 23 Feb 2022 11:34:32 +0100 Subject: [PATCH] Renaming some methods to be more concise --- .../app/features/media/AttachmentInteractionListener.kt | 4 ++-- .../im/vector/app/features/media/AttachmentOverlayView.kt | 4 ++-- .../app/features/media/VectorAttachmentViewerActivity.kt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/media/AttachmentInteractionListener.kt b/vector/src/main/java/im/vector/app/features/media/AttachmentInteractionListener.kt index 3a8d9b49a6..e8f00427f1 100644 --- a/vector/src/main/java/im/vector/app/features/media/AttachmentInteractionListener.kt +++ b/vector/src/main/java/im/vector/app/features/media/AttachmentInteractionListener.kt @@ -17,8 +17,8 @@ package im.vector.app.features.media interface AttachmentInteractionListener { - fun onDismissTapped() - fun onShareTapped() + fun onDismiss() + fun onShare() fun onPlayPause(play: Boolean) fun videoSeekTo(percent: Int) } diff --git a/vector/src/main/java/im/vector/app/features/media/AttachmentOverlayView.kt b/vector/src/main/java/im/vector/app/features/media/AttachmentOverlayView.kt index 47dbae863b..44e736d07a 100644 --- a/vector/src/main/java/im/vector/app/features/media/AttachmentOverlayView.kt +++ b/vector/src/main/java/im/vector/app/features/media/AttachmentOverlayView.kt @@ -49,10 +49,10 @@ class AttachmentOverlayView @JvmOverloads constructor( views = MergeImageAttachmentOverlayBinding.bind(this) setBackgroundColor(Color.TRANSPARENT) views.overlayBackButton.setOnClickListener { - interactionListener?.onDismissTapped() + interactionListener?.onDismiss() } views.overlayShareButton.setOnClickListener { - interactionListener?.onShareTapped() + interactionListener?.onShare() } views.overlayPlayPauseButton.setOnClickListener { interactionListener?.onPlayPause(!isPlaying) diff --git a/vector/src/main/java/im/vector/app/features/media/VectorAttachmentViewerActivity.kt b/vector/src/main/java/im/vector/app/features/media/VectorAttachmentViewerActivity.kt index 0e8405d0a1..3e8f48df98 100644 --- a/vector/src/main/java/im/vector/app/features/media/VectorAttachmentViewerActivity.kt +++ b/vector/src/main/java/im/vector/app/features/media/VectorAttachmentViewerActivity.kt @@ -241,7 +241,7 @@ class VectorAttachmentViewerActivity : AttachmentViewerActivity(), AttachmentInt * Specialization AttachmentInteractionListener * ========================================================================================== */ - override fun onDismissTapped() { + override fun onDismiss() { animateClose() } @@ -255,7 +255,7 @@ class VectorAttachmentViewerActivity : AttachmentViewerActivity(), AttachmentInt // TODO add save feature for image => check it works for video as well, // check if it is already possible to save from menu with long press on video - override fun onShareTapped() { + override fun onShare() { // TODO the opening of share bottom sheet is extremely slow // move the retrieve of the file into ViewModel and use a ViewEvent to call shareMedia lifecycleScope.launch(Dispatchers.IO) {