From d9f9fb51db3538b941f442187c6f5e2958287884 Mon Sep 17 00:00:00 2001 From: Balazs Toldi Date: Wed, 23 Aug 2023 11:21:19 +0200 Subject: [PATCH] Fix instance info activity card background colours --- .../activities/InstanceInfoActivity.java | 3 +++ scripts/commits-between-tags.sh | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 scripts/commits-between-tags.sh diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/activities/InstanceInfoActivity.java b/app/src/main/java/eu/toldi/infinityforlemmy/activities/InstanceInfoActivity.java index 4d3383e1..a8cb9a99 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/activities/InstanceInfoActivity.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/activities/InstanceInfoActivity.java @@ -204,6 +204,9 @@ public class InstanceInfoActivity extends BaseActivity { protected void applyCustomTheme() { coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor()); applyAppBarLayoutAndCollapsingToolbarLayoutAndToolbarTheme(appBarLayout, null, toolbar); + mStatisticsCardView.setCardBackgroundColor(mCustomThemeWrapper.getCardViewBackgroundColor()); + mDescriptionCardView.setCardBackgroundColor(mCustomThemeWrapper.getCardViewBackgroundColor()); + mAdminsCardView.setCardBackgroundColor(mCustomThemeWrapper.getCardViewBackgroundColor()); mUsersImageView.setColorFilter(mCustomThemeWrapper.getPrimaryTextColor(), PorterDuff.Mode.SRC_IN); mCommunitiesImageView.setColorFilter(mCustomThemeWrapper.getPrimaryTextColor(), PorterDuff.Mode.SRC_IN); mPostsImageView.setColorFilter(mCustomThemeWrapper.getPrimaryTextColor(), PorterDuff.Mode.SRC_IN); diff --git a/scripts/commits-between-tags.sh b/scripts/commits-between-tags.sh new file mode 100755 index 00000000..8108fd54 --- /dev/null +++ b/scripts/commits-between-tags.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# get the latest two tags +tags=$(git tag --sort=-creatordate | head -n 2) + +# split tags into an array +tag_array=($tags) + +# check if there are enough tags +if [ ${#tag_array[@]} -lt 2 ]; then + echo "Not enough tags in the repository. Need at least two tags." + exit 1 +fi + +# get the latest two tags +latest_tag=${tag_array[0]} +second_latest_tag=${tag_array[1]} + +# extract short hashes and full commit messages without pager +git --no-pager log --pretty=format:"%h - %B" $second_latest_tag..$latest_tag