1
0
mirror of https://github.com/flarum/core.git synced 2025-07-23 17:51:24 +02:00

Fix swiping to the right to mark as read

This commit is contained in:
Toby Zerner
2015-07-28 12:15:45 +09:30
parent 5d9db2744e
commit c5fd4418fb

View File

@@ -93,7 +93,7 @@ export default function slidable(element) {
if ($underneath.length) { if ($underneath.length) {
const active = side === 'left' ? pos > 0 : pos < 0; const active = side === 'left' ? pos > 0 : pos < 0;
if (active && $underneath.hasClass('elastic')) { if (active && $underneath.hasClass('Slidable-underneath--elastic')) {
pos -= pos * 0.5; pos -= pos * 0.5;
} }
$underneath.toggle(active); $underneath.toggle(active);
@@ -126,7 +126,7 @@ export default function slidable(element) {
const activate = $underneath => { const activate = $underneath => {
$underneath.click(); $underneath.click();
if ($underneath.hasClass('elastic')) { if ($underneath.hasClass('Slidable-underneath--elastic')) {
reset(); reset();
} else { } else {
animatePos((pos > 0 ? 1 : -1) * $element.width()); animatePos((pos > 0 ? 1 : -1) * $element.width());