Swipes respect reduced motion setting

This commit is contained in:
Cohee
2024-07-01 00:01:22 +03:00
parent de79cf74c6
commit 1b6e816525

View File

@ -7898,7 +7898,7 @@ function swipe_left() { // when we swipe left..but no generation.
} }
$(this).parent().children('.mes_block').transition({ $(this).parent().children('.mes_block').transition({
x: swipe_range, x: swipe_range,
duration: swipe_duration, duration: animation_duration > 0 ? swipe_duration : 0,
easing: animation_easing, easing: animation_easing,
queue: false, queue: false,
complete: async function () { complete: async function () {
@ -7941,7 +7941,7 @@ function swipe_left() { // when we swipe left..but no generation.
complete: function () { complete: function () {
$(this).parent().children('.mes_block').transition({ $(this).parent().children('.mes_block').transition({
x: '0px', x: '0px',
duration: swipe_duration, duration: animation_duration > 0 ? swipe_duration : 0,
easing: animation_easing, easing: animation_easing,
queue: false, queue: false,
complete: async function () { complete: async function () {
@ -7956,7 +7956,7 @@ function swipe_left() { // when we swipe left..but no generation.
$(this).parent().children('.avatar').transition({ $(this).parent().children('.avatar').transition({
x: swipe_range, x: swipe_range,
duration: swipe_duration, duration: animation_duration > 0 ? swipe_duration : 0,
easing: animation_easing, easing: animation_easing,
queue: false, queue: false,
complete: function () { complete: function () {
@ -7968,7 +7968,7 @@ function swipe_left() { // when we swipe left..but no generation.
complete: function () { complete: function () {
$(this).parent().children('.avatar').transition({ $(this).parent().children('.avatar').transition({
x: '0px', x: '0px',
duration: swipe_duration, duration: animation_duration > 0 ? swipe_duration : 0,
easing: animation_easing, easing: animation_easing,
queue: false, queue: false,
complete: function () { complete: function () {
@ -8075,7 +8075,7 @@ const swipe_right = () => {
this_mes_div.children('.swipe_left').css('display', 'flex'); this_mes_div.children('.swipe_left').css('display', 'flex');
this_mes_div.children('.mes_block').transition({ // this moves the div back and forth this_mes_div.children('.mes_block').transition({ // this moves the div back and forth
x: '-' + swipe_range, x: '-' + swipe_range,
duration: swipe_duration, duration: animation_duration > 0 ? swipe_duration : 0,
easing: animation_easing, easing: animation_easing,
queue: false, queue: false,
complete: async function () { complete: async function () {
@ -8134,7 +8134,7 @@ const swipe_right = () => {
complete: function () { complete: function () {
this_mes_div.children('.mes_block').transition({ this_mes_div.children('.mes_block').transition({
x: '0px', x: '0px',
duration: swipe_duration, duration: animation_duration > 0 ? swipe_duration : 0,
easing: animation_easing, easing: animation_easing,
queue: false, queue: false,
complete: async function () { complete: async function () {
@ -8157,7 +8157,7 @@ const swipe_right = () => {
}); });
this_mes_div.children('.avatar').transition({ // moves avatar along with swipe this_mes_div.children('.avatar').transition({ // moves avatar along with swipe
x: '-' + swipe_range, x: '-' + swipe_range,
duration: swipe_duration, duration: animation_duration > 0 ? swipe_duration : 0,
easing: animation_easing, easing: animation_easing,
queue: false, queue: false,
complete: function () { complete: function () {
@ -8169,7 +8169,7 @@ const swipe_right = () => {
complete: function () { complete: function () {
this_mes_div.children('.avatar').transition({ this_mes_div.children('.avatar').transition({
x: '0px', x: '0px',
duration: swipe_duration, duration: animation_duration > 0 ? swipe_duration : 0,
easing: animation_easing, easing: animation_easing,
queue: false, queue: false,
complete: function () { complete: function () {