mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-01-07 00:20:08 +02:00
Release 3.13.7
This commit is contained in:
parent
566b50d394
commit
e23d2caf00
5 changed files with 48 additions and 14 deletions
|
@ -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"
|
||||
|
|
|
@ -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",
|
||||
"code": "460",
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue