From 01109c38421d85136258101a4f79e695c5243b7c Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 4 Mar 2025 17:50:03 +0100 Subject: [PATCH] Allow to scroll buttons for larger screen in conversation --- .../mastodon/helper/DividerDecoration.java | 6 +- .../ui/fragment/FragmentLoginMain.java | 3 +- .../layouts/mastodon/layout/drawer_status.xml | 135 +++++++++--------- 3 files changed, 72 insertions(+), 72 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/DividerDecoration.java b/app/src/main/java/app/fedilab/android/mastodon/helper/DividerDecoration.java index 6f9e2758..4d7d0df2 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/helper/DividerDecoration.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/DividerDecoration.java @@ -69,9 +69,8 @@ public class DividerDecoration extends RecyclerView.ItemDecoration { StatusAdapter statusAdapter = ((StatusAdapter) parent.getAdapter()); if (statusAdapter != null && statusAdapter.getItemCount() > position && position > 0) { Status status = statusAdapter.getItem(position); - int indentation = (status.isFocused?1:indentationMax); int start = (int) Helper.convertDpToPixel( - 6 * fontScale * CommentDecorationHelper.getIndentation(status.in_reply_to_id, statusList, indentation), + 6 * fontScale * CommentDecorationHelper.getIndentation(status.in_reply_to_id, statusList, indentationMax), _mContext); if (parent.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR) { @@ -95,9 +94,6 @@ public class DividerDecoration extends RecyclerView.ItemDecoration { int indentation = Math.min( CommentDecorationHelper.getIndentation(status.in_reply_to_id, statusList, indentationMax), indentationMax); - if(status.isFocused) { - indentation = 1; - } if (indentation > 0) { Paint paint = new Paint(); paint.setDither(false); diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginMain.java b/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginMain.java index d39913aa..688072e7 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginMain.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/FragmentLoginMain.java @@ -22,7 +22,6 @@ import static app.fedilab.android.activities.LoginActivity.client_secretLogin; import static app.fedilab.android.activities.LoginActivity.currentInstanceLogin; import static app.fedilab.android.activities.LoginActivity.requestedAdmin; import static app.fedilab.android.activities.LoginActivity.softwareLogin; -import static app.fedilab.android.mastodon.helper.Helper.TAG; import android.Manifest; import android.content.Intent; @@ -263,7 +262,7 @@ public class FragmentLoginMain extends Fragment { if (apiLogin != Account.API.PEERTUBE) { retrievesClientId(currentInstanceLogin); } else { - Intent peertubeLogin = new Intent(requireActivity(), LoginActivity.class); + Intent peertubeLogin = new Intent(requireActivity(), app.fedilab.android.peertube.activities.LoginActivity.class); peertubeLogin.putExtra(Helper.ARG_INSTANCE, instance); startActivity(peertubeLogin); requireActivity().finish(); diff --git a/app/src/main/res/layouts/mastodon/layout/drawer_status.xml b/app/src/main/res/layouts/mastodon/layout/drawer_status.xml index 2d0a3c8a..1459c9c4 100644 --- a/app/src/main/res/layouts/mastodon/layout/drawer_status.xml +++ b/app/src/main/res/layouts/mastodon/layout/drawer_status.xml @@ -528,86 +528,91 @@ tools:text="Fedilab" tools:visibility="visible" /> - - - - + android:layout_marginEnd="6dp"> + android:padding="6dp" + android:visibility="gone" + tools:visibility="visible"> + + + + + + + + + + + + + + + + + + + - - + android:adjustViewBounds="true" + app:srcCompat="@drawable/ic_baseline_public_24" /> + - - - - - - - - - - - - -