fix: 🐛 swipe bug
This commit is contained in:
parent
bca91426db
commit
1886193b8e
3 changed files with 8 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"version": "12.118.1-calc.11.5",
|
"version": "12.118.1-calc.11.6",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -138,15 +138,15 @@ if (isMobile.value) {
|
||||||
let tabs = ['all', 'unread', 'mentions', 'directNotes'];
|
let tabs = ['all', 'unread', 'mentions', 'directNotes'];
|
||||||
|
|
||||||
if (Math.abs(xDiff) > Math.abs(yDiff)) {
|
if (Math.abs(xDiff) > Math.abs(yDiff)) {
|
||||||
if (xDiff > 0) {
|
if (xDiff < 0) {
|
||||||
if (tab === 'all') {
|
if (tab === 'all') {
|
||||||
next = 'directNotes';
|
next = 'directNotes';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
next = tabs[(tabs.indexOf(tab) + 1) % tabs.length];
|
next = tabs[(tabs.indexOf(tab) - 1) % tabs.length];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
next = tabs[(tabs.indexOf(tab) - 1) % tabs.length];
|
next = tabs[(tabs.indexOf(tab) + 1) % tabs.length];
|
||||||
}
|
}
|
||||||
tab = next;
|
tab = next;
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,15 +275,15 @@ if (isMobile.value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.abs(xDiff) > Math.abs(yDiff)) {
|
if (Math.abs(xDiff) > Math.abs(yDiff)) {
|
||||||
if (xDiff > 0) {
|
if (xDiff < 0) {
|
||||||
if (src === 'home') {
|
if (src === 'home') {
|
||||||
next = 'global'
|
next = 'global';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
next = timelines[(timelines.indexOf(src) + 1) % timelines.length];
|
next = timelines[(timelines.indexOf(src) - 1) % timelines.length];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
next = timelines[(timelines.indexOf(src) - 1) % timelines.length];
|
next = timelines[(timelines.indexOf(src) + 1) % timelines.length];
|
||||||
}
|
}
|
||||||
saveSrc(next);
|
saveSrc(next);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue