diff options
author | Thomas <tschneider.ac@gmail.com> | 2023-01-06 18:37:26 +0100 |
---|---|---|
committer | Thomas <tschneider.ac@gmail.com> | 2023-01-06 18:37:26 +0100 |
commit | e23d2caf000eda826a4cbfb032b81eeb472d65c7 (patch) | |
tree | 94c0a021689f11eb31dd5e5c6dd9b52d73e1fe75 | |
parent | 566b50d39410f5ca297fc8f7f059f0afb42876a9 (diff) |
Release 3.13.7
-rw-r--r-- | app/build.gradle | 4 | ||||
-rw-r--r-- | app/src/main/assets/release_notes/notes.json | 5 | ||||
-rw-r--r-- | app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java | 26 | ||||
-rw-r--r-- | app/src/main/res/layout/drawer_status_pixelfed.xml | 24 | ||||
-rw-r--r-- | src/fdroid/fastlane/metadata/android/en/changelogs/461.txt | 3 |
5 files changed, 48 insertions, 14 deletions
diff --git a/app/build.gradle b/app/build.gradle index 1ad481d40..5efca00f0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,8 +13,8 @@ android { defaultConfig { minSdk 21 targetSdk 33 - versionCode 460 - versionName "3.13.6" + versionCode 461 + versionName "3.13.7" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } flavorDimensions "default" diff --git a/app/src/main/assets/release_notes/notes.json b/app/src/main/assets/release_notes/notes.json index e8fc65450..35d084d40 100644 --- a/app/src/main/assets/release_notes/notes.json +++ b/app/src/main/assets/release_notes/notes.json @@ -1,5 +1,10 @@ [ { + "version": "3.13.7", + "code": "461", + "note": "Added:\n- Pixelfed: Custom layout to display Media fully \n*(Settings > Timelines > Pixelfed Presentation) - Also works for other softwares when there are media\n\nChanged:\n- Add pinned tag in \"any\" to avoid to lose it when renaming timeline\n\nFixed:\n- Fix push notifications with several accounts\n- Fix quotes with tags/mentions\n- Fix notifications\n- Fix sending multiple media\n- Some crashes" + }, + { "version": "3.13.6", "code": "460", "note": "Fixed:\n- Cross-compose: Wrong instance emojis\n- Custom emojis not displayed in notifications\n- Fav/Boost markers with shared messages\n- Empty notifications\n- Fix cw removed when replying\n- Fix expand media with fit preview images when sensitive\n- Fix an issue with fetch more displayed too often (cache clear will help or wait new messages)" diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java index 376951461..45bf4949b 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java @@ -195,6 +195,9 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> private static boolean isVisiblePixelfed(Status status) { + if (status.reblog != null) { + status = status.reblog; + } return status.media_attachments != null && status.media_attachments.size() > 0; } @@ -2606,24 +2609,33 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> context.startActivity(intent); }); } else if (viewHolder.getItemViewType() == STATUS_PIXELFED) { + Status statusToDeal = status.reblog != null ? status.reblog : status; StatusViewHolder holder = (StatusViewHolder) viewHolder; - MastodonHelper.loadPPMastodon(holder.bindingPixelfed.artPp, status.account); - SliderAdapter adapter = new SliderAdapter(status); + + if (status.reblog != null) { + MastodonHelper.loadPPMastodon(holder.bindingPixelfed.artReblogPp, status.account); + holder.bindingPixelfed.artReblogPp.setVisibility(View.VISIBLE); + } else { + holder.bindingPixelfed.artReblogPp.setVisibility(View.GONE); + } + + MastodonHelper.loadPPMastodon(holder.bindingPixelfed.artPp, statusToDeal.account); + SliderAdapter adapter = new SliderAdapter(statusToDeal); holder.bindingPixelfed.artMedia.setSliderAdapter(adapter); holder.bindingPixelfed.artMedia.setSliderTransformAnimation(SliderAnimations.SIMPLETRANSFORMATION); holder.bindingPixelfed.artMedia.setAutoCycleDirection(SliderView.AUTO_CYCLE_DIRECTION_BACK_AND_FORTH); holder.bindingPixelfed.artMedia.setScrollTimeInSec(4); holder.bindingPixelfed.artMedia.startAutoCycle(); - holder.bindingPixelfed.commentNumber.setText(String.valueOf(status.replies_count)); + holder.bindingPixelfed.commentNumber.setText(String.valueOf(statusToDeal.replies_count)); holder.bindingPixelfed.artUsername.setText( - status.account.getSpanDisplayName(context, + statusToDeal.account.getSpanDisplayName(context, new WeakReference<>(holder.bindingPixelfed.artUsername)), TextView.BufferType.SPANNABLE); - holder.bindingPixelfed.artAcct.setText(String.format(Locale.getDefault(), "@%s", status.account.acct)); + holder.bindingPixelfed.artAcct.setText(String.format(Locale.getDefault(), "@%s", statusToDeal.account.acct)); holder.bindingPixelfed.artPp.setOnClickListener(v -> { Intent intent = new Intent(context, ProfileActivity.class); Bundle b = new Bundle(); - b.putSerializable(Helper.ARG_ACCOUNT, status.account); + b.putSerializable(Helper.ARG_ACCOUNT, statusToDeal.account); intent.putExtras(b); ActivityOptionsCompat options = ActivityOptionsCompat .makeSceneTransitionAnimation((Activity) context, holder.bindingPixelfed.artPp, context.getString(R.string.activity_porfile_pp)); @@ -2631,7 +2643,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> }); holder.bindingPixelfed.bottomBanner.setOnClickListener(v -> { Intent intent = new Intent(context, ContextActivity.class); - intent.putExtra(Helper.ARG_STATUS, status); + intent.putExtra(Helper.ARG_STATUS, statusToDeal); context.startActivity(intent); }); } diff --git a/app/src/main/res/layout/drawer_status_pixelfed.xml b/app/src/main/res/layout/drawer_status_pixelfed.xml index 317c14b3f..c410908d1 100644 --- a/app/src/main/res/layout/drawer_status_pixelfed.xml +++ b/app/src/main/res/layout/drawer_status_pixelfed.xml @@ -18,6 +18,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/art_container" + android:layout_marginHorizontal="@dimen/card_margin" + android:layout_marginTop="@dimen/card_margin" android:layout_width="match_parent" android:layout_height="wrap_content"> @@ -54,12 +56,24 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent"> - - <androidx.appcompat.widget.AppCompatImageView - android:id="@+id/art_pp" + <RelativeLayout android:layout_width="50dp" - android:layout_height="50dp" - android:layout_gravity="center" /> + android:layout_height="50dp"> + + <androidx.appcompat.widget.AppCompatImageView + android:id="@+id/art_pp" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" /> + + <androidx.appcompat.widget.AppCompatImageView + android:id="@+id/art_reblog_pp" + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_alignParentEnd="true" + android:layout_alignParentBottom="true" /> + </RelativeLayout> + <androidx.appcompat.widget.LinearLayoutCompat android:id="@+id/art_author" diff --git a/src/fdroid/fastlane/metadata/android/en/changelogs/461.txt b/src/fdroid/fastlane/metadata/android/en/changelogs/461.txt index fc06af601..c42cfb77a 100644 --- a/src/fdroid/fastlane/metadata/android/en/changelogs/461.txt +++ b/src/fdroid/fastlane/metadata/android/en/changelogs/461.txt @@ -1,3 +1,6 @@ +Added: +- Pixelfed: Custom layout to display Media fully +*(Settings > Timelines > Pixelfed Presentation) - Also works for other softwares when there are media Changed: - Add pinned tag in "any" to avoid to lose it when renaming timeline |