diff --git a/packages/client/src/pages/notifications.vue b/packages/client/src/pages/notifications.vue index ea5e8228f..ae8025e22 100644 --- a/packages/client/src/pages/notifications.vue +++ b/packages/client/src/pages/notifications.vue @@ -103,56 +103,4 @@ definePageMetadata(computed(() => ({ title: i18n.ts.notifications, icon: 'fas fa-bell', }))); - -if (isMobile.value) { - document.addEventListener('touchstart', handleTouchStart, false); - document.addEventListener('touchmove', handleTouchMove, false); - - let xDown = null; - let yDown = null; - - function getTouches(evt) { - return ( - evt.touches || evt.originalEvent.touches - ); - } - - function handleTouchStart(evt) { - const firstTouch = getTouches(evt)[0]; - xDown = firstTouch.clientX; - yDown = firstTouch.clientY; - } - - function handleTouchMove(evt) { - if (!xDown || !yDown) { - return; - } - - let xUp = evt.touches[0].clientX; - let yUp = evt.touches[0].clientY; - - let xDiff = xDown - xUp; - let yDiff = yDown - yUp; - - let next = 'home'; - let tabs = ['all', 'unread', 'mentions', 'directNotes']; - - if (Math.abs(xDiff) > Math.abs(yDiff)) { - if (xDiff < 0) { - if (tab === 'all') { - next = 'directNotes'; - } - else { - next = tabs[(tabs.indexOf(tab) - 1) % tabs.length]; - } - } else { - next = tabs[(tabs.indexOf(tab) + 1) % tabs.length]; - } - tab = next; - } - xDown = null; - yDown = null; - return; - } -}