From ce67fb30bfbc5882967de413905d00ff6357862b Mon Sep 17 00:00:00 2001 From: FineFindus <63370021+FineFindus@users.noreply.github.com> Date: Fri, 17 Feb 2023 22:35:46 +0100 Subject: [PATCH 1/2] fix(favourite): set correct gravity for animation --- mastodon/src/main/res/layout/display_item_footer.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/res/layout/display_item_footer.xml b/mastodon/src/main/res/layout/display_item_footer.xml index 99896e58f..b2b382cc7 100644 --- a/mastodon/src/main/res/layout/display_item_footer.xml +++ b/mastodon/src/main/res/layout/display_item_footer.xml @@ -64,7 +64,7 @@ android:id="@+id/favorite" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_gravity="center_vertical" + android:layout_gravity="center" android:drawableStart="@drawable/ic_fluent_star_24_selector" android:drawablePadding="8dp" android:paddingHorizontal="8dp" From 307410043297ebeeb822984b9adde81f4b7978d3 Mon Sep 17 00:00:00 2001 From: FineFindus <63370021+FineFindus@users.noreply.github.com> Date: Fri, 17 Feb 2023 22:36:34 +0100 Subject: [PATCH 2/2] fix(favourite): re-enable star animation --- .../android/ui/displayitems/FooterStatusDisplayItem.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 c5b2afe06..30b3bb225 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 @@ -312,11 +312,7 @@ 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) { -// if(GlobalUserPreferences.reduceMotion){ - v.startAnimation(opacityIn); -// }else{ -// v.startAnimation(animSet); -// } + v.startAnimation(GlobalUserPreferences.reduceMotion ? opacityIn : animSet); } else { v.startAnimation(opacityIn); }