Renaming some methods to be more concise

This commit is contained in:
Maxime Naturel 2022-02-23 11:34:32 +01:00
parent 6899b5b637
commit 042c57f9b8
3 changed files with 6 additions and 6 deletions

View file

@ -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)
}

View file

@ -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)

View file

@ -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) {