Renaming some methods to be more concise
This commit is contained in:
parent
6899b5b637
commit
042c57f9b8
@ -17,8 +17,8 @@
|
|||||||
package im.vector.app.features.media
|
package im.vector.app.features.media
|
||||||
|
|
||||||
interface AttachmentInteractionListener {
|
interface AttachmentInteractionListener {
|
||||||
fun onDismissTapped()
|
fun onDismiss()
|
||||||
fun onShareTapped()
|
fun onShare()
|
||||||
fun onPlayPause(play: Boolean)
|
fun onPlayPause(play: Boolean)
|
||||||
fun videoSeekTo(percent: Int)
|
fun videoSeekTo(percent: Int)
|
||||||
}
|
}
|
||||||
|
@ -49,10 +49,10 @@ class AttachmentOverlayView @JvmOverloads constructor(
|
|||||||
views = MergeImageAttachmentOverlayBinding.bind(this)
|
views = MergeImageAttachmentOverlayBinding.bind(this)
|
||||||
setBackgroundColor(Color.TRANSPARENT)
|
setBackgroundColor(Color.TRANSPARENT)
|
||||||
views.overlayBackButton.setOnClickListener {
|
views.overlayBackButton.setOnClickListener {
|
||||||
interactionListener?.onDismissTapped()
|
interactionListener?.onDismiss()
|
||||||
}
|
}
|
||||||
views.overlayShareButton.setOnClickListener {
|
views.overlayShareButton.setOnClickListener {
|
||||||
interactionListener?.onShareTapped()
|
interactionListener?.onShare()
|
||||||
}
|
}
|
||||||
views.overlayPlayPauseButton.setOnClickListener {
|
views.overlayPlayPauseButton.setOnClickListener {
|
||||||
interactionListener?.onPlayPause(!isPlaying)
|
interactionListener?.onPlayPause(!isPlaying)
|
||||||
|
@ -241,7 +241,7 @@ class VectorAttachmentViewerActivity : AttachmentViewerActivity(), AttachmentInt
|
|||||||
* Specialization AttachmentInteractionListener
|
* Specialization AttachmentInteractionListener
|
||||||
* ========================================================================================== */
|
* ========================================================================================== */
|
||||||
|
|
||||||
override fun onDismissTapped() {
|
override fun onDismiss() {
|
||||||
animateClose()
|
animateClose()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ class VectorAttachmentViewerActivity : AttachmentViewerActivity(), AttachmentInt
|
|||||||
|
|
||||||
// TODO add save feature for image => check it works for video as well,
|
// 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
|
// 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
|
// 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
|
// move the retrieve of the file into ViewModel and use a ViewEvent to call shareMedia
|
||||||
lifecycleScope.launch(Dispatchers.IO) {
|
lifecycleScope.launch(Dispatchers.IO) {
|
||||||
|
Loading…
Reference in New Issue
Block a user