Release 3.13.7

maths
Thomas 2 years ago
parent 566b50d394
commit e23d2caf00

@ -13,8 +13,8 @@ android {
defaultConfig { defaultConfig {
minSdk 21 minSdk 21
targetSdk 33 targetSdk 33
versionCode 460 versionCode 461
versionName "3.13.6" versionName "3.13.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
flavorDimensions "default" flavorDimensions "default"

@ -1,4 +1,9 @@
[ [
{
"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", "version": "3.13.6",
"code": "460", "code": "460",

@ -195,6 +195,9 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
private static boolean isVisiblePixelfed(Status status) { private static boolean isVisiblePixelfed(Status status) {
if (status.reblog != null) {
status = status.reblog;
}
return status.media_attachments != null && status.media_attachments.size() > 0; 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); context.startActivity(intent);
}); });
} else if (viewHolder.getItemViewType() == STATUS_PIXELFED) { } else if (viewHolder.getItemViewType() == STATUS_PIXELFED) {
Status statusToDeal = status.reblog != null ? status.reblog : status;
StatusViewHolder holder = (StatusViewHolder) viewHolder; 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.setSliderAdapter(adapter);
holder.bindingPixelfed.artMedia.setSliderTransformAnimation(SliderAnimations.SIMPLETRANSFORMATION); holder.bindingPixelfed.artMedia.setSliderTransformAnimation(SliderAnimations.SIMPLETRANSFORMATION);
holder.bindingPixelfed.artMedia.setAutoCycleDirection(SliderView.AUTO_CYCLE_DIRECTION_BACK_AND_FORTH); holder.bindingPixelfed.artMedia.setAutoCycleDirection(SliderView.AUTO_CYCLE_DIRECTION_BACK_AND_FORTH);
holder.bindingPixelfed.artMedia.setScrollTimeInSec(4); holder.bindingPixelfed.artMedia.setScrollTimeInSec(4);
holder.bindingPixelfed.artMedia.startAutoCycle(); 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( holder.bindingPixelfed.artUsername.setText(
status.account.getSpanDisplayName(context, statusToDeal.account.getSpanDisplayName(context,
new WeakReference<>(holder.bindingPixelfed.artUsername)), new WeakReference<>(holder.bindingPixelfed.artUsername)),
TextView.BufferType.SPANNABLE); 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 -> { holder.bindingPixelfed.artPp.setOnClickListener(v -> {
Intent intent = new Intent(context, ProfileActivity.class); Intent intent = new Intent(context, ProfileActivity.class);
Bundle b = new Bundle(); Bundle b = new Bundle();
b.putSerializable(Helper.ARG_ACCOUNT, status.account); b.putSerializable(Helper.ARG_ACCOUNT, statusToDeal.account);
intent.putExtras(b); intent.putExtras(b);
ActivityOptionsCompat options = ActivityOptionsCompat ActivityOptionsCompat options = ActivityOptionsCompat
.makeSceneTransitionAnimation((Activity) context, holder.bindingPixelfed.artPp, context.getString(R.string.activity_porfile_pp)); .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 -> { holder.bindingPixelfed.bottomBanner.setOnClickListener(v -> {
Intent intent = new Intent(context, ContextActivity.class); Intent intent = new Intent(context, ContextActivity.class);
intent.putExtra(Helper.ARG_STATUS, status); intent.putExtra(Helper.ARG_STATUS, statusToDeal);
context.startActivity(intent); context.startActivity(intent);
}); });
} }

@ -18,6 +18,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/art_container" android:id="@+id/art_container"
android:layout_marginHorizontal="@dimen/card_margin"
android:layout_marginTop="@dimen/card_margin"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -54,12 +56,24 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent">
<RelativeLayout
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/art_pp"
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="50dp">
android:layout_gravity="center" />
<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 <androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/art_author" android:id="@+id/art_author"

@ -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: Changed:
- Add pinned tag in "any" to avoid to lose it when renaming timeline - Add pinned tag in "any" to avoid to lose it when renaming timeline

Loading…
Cancel
Save