File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 22 <div
33 v-show =" (isMobile && !showRoomsList) || !isMobile || singleRoom"
44 class =" vac-col-messages"
5+ @touchstart =" touchStart"
56 >
67 <slot v-if =" showNoRoom" name =" no-room-selected" >
78 <div class =" vac-container-center vac-room-empty" >
@@ -562,6 +563,26 @@ export default {
562563 },
563564
564565 methods: {
566+ touchStart (touchEvent ) {
567+ if (touchEvent .changedTouches .length === 1 ) {
568+ const posXStart = touchEvent .changedTouches [0 ].clientX
569+
570+ addEventListener (
571+ ' touchend' ,
572+ touchEvent => this .touchEnd (touchEvent, posXStart),
573+ { once: true }
574+ )
575+ }
576+ },
577+ touchEnd (touchEvent , posXStart ) {
578+ if (touchEvent .changedTouches .length === 1 ) {
579+ const posXEnd = touchEvent .changedTouches [0 ].clientX
580+
581+ if (posXEnd - posXStart > 30 ) {
582+ this .$emit (' toggle-rooms-list' )
583+ }
584+ }
585+ },
565586 onRoomChanged () {
566587 this .loadingMessages = true
567588 this .scrollIcon = false
You can’t perform that action at this time.
0 commit comments