fix: 🐛 swipe bug

This commit is contained in:
ThatOneCalculator 2022-08-20 00:04:45 -07:00
parent bca91426db
commit 1886193b8e
3 changed files with 8 additions and 8 deletions

View file

@ -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",

View file

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

View file

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