From 1886193b8e41891c698337bfbd3d630c4e0eb5ac Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 20 Aug 2022 00:04:45 -0700 Subject: [PATCH] fix: :bug: swipe bug --- package.json | 2 +- packages/client/src/pages/notifications.vue | 6 +++--- packages/client/src/pages/timeline.vue | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index dd4df64155..93ba8755cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.118.1-calc.11.5", + "version": "12.118.1-calc.11.6", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/pages/notifications.vue b/packages/client/src/pages/notifications.vue index b290203f08..ea5e8228fb 100644 --- a/packages/client/src/pages/notifications.vue +++ b/packages/client/src/pages/notifications.vue @@ -138,15 +138,15 @@ if (isMobile.value) { let tabs = ['all', 'unread', 'mentions', 'directNotes']; if (Math.abs(xDiff) > Math.abs(yDiff)) { - if (xDiff > 0) { + if (xDiff < 0) { if (tab === 'all') { next = 'directNotes'; } else { - next = tabs[(tabs.indexOf(tab) + 1) % tabs.length]; + next = tabs[(tabs.indexOf(tab) - 1) % tabs.length]; } } else { - next = tabs[(tabs.indexOf(tab) - 1) % tabs.length]; + next = tabs[(tabs.indexOf(tab) + 1) % tabs.length]; } tab = next; } diff --git a/packages/client/src/pages/timeline.vue b/packages/client/src/pages/timeline.vue index 82fac41053..5f2898a8a3 100644 --- a/packages/client/src/pages/timeline.vue +++ b/packages/client/src/pages/timeline.vue @@ -275,15 +275,15 @@ if (isMobile.value) { } if (Math.abs(xDiff) > Math.abs(yDiff)) { - if (xDiff > 0) { + if (xDiff < 0) { if (src === 'home') { - next = 'global' + next = 'global'; } else { - next = timelines[(timelines.indexOf(src) + 1) % timelines.length]; + next = timelines[(timelines.indexOf(src) - 1) % timelines.length]; } } else { - next = timelines[(timelines.indexOf(src) - 1) % timelines.length]; + next = timelines[(timelines.indexOf(src) + 1) % timelines.length]; } saveSrc(next); }