From 101e7efd7441cb52fe20fcc36fdfa79acc36871d Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Fri, 6 Jan 2023 11:18:51 -0300 Subject: [PATCH] Fixing #34 --- .../org/joinmastodon/android/GlobalUserPreferences.java | 1 + .../android/ui/displayitems/FooterStatusDisplayItem.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java b/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java index c72c63861..15c102dea 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java +++ b/mastodon/src/main/java/org/joinmastodon/android/GlobalUserPreferences.java @@ -69,6 +69,7 @@ public class GlobalUserPreferences{ relocatePublishButton=prefs.getBoolean("relocatePublishButton", true); voteButtonForSingleChoice=prefs.getBoolean("voteButtonForSingleChoice", true); enableDeleteNotifications=prefs.getBoolean("enableDeleteNotifications", true); + reduceMotion=prefs.getBoolean("reduceMotion", false); theme=ThemePreference.values()[prefs.getInt("theme", 0)]; recentLanguages=fromJson(prefs.getString("recentLanguages", "{}"), recentLanguagesType, new HashMap<>()); recentEmojis=fromJson(prefs.getString("recentEmojis", "{}"), recentEmojisType, new HashMap<>()); diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java index a5ad255fc..da595a0d5 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java @@ -311,7 +311,11 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{ favorite.setSelected(!item.status.favourited); AccountSessionManager.getInstance().getAccount(item.accountID).getStatusInteractionController().setFavorited(item.status, !item.status.favourited, r->{ if (item.status.favourited) { - v.startAnimation(animSet); + if(GlobalUserPreferences.reduceMotion){ + v.startAnimation(opacityIn); + }else{ + v.startAnimation(animSet); + } } else { v.startAnimation(opacityIn); }