Fix issue #1129 - Changed: Give more width to the detailed message in conversations

This commit is contained in:
Thomas 2025-02-27 11:28:47 +01:00
parent 02a9e26f2c
commit d98ba21957
2 changed files with 7 additions and 5 deletions

View file

@ -69,9 +69,9 @@ public class DividerDecoration extends RecyclerView.ItemDecoration {
StatusAdapter statusAdapter = ((StatusAdapter) parent.getAdapter()); StatusAdapter statusAdapter = ((StatusAdapter) parent.getAdapter());
if (statusAdapter != null && statusAdapter.getItemCount() > position && position > 0) { if (statusAdapter != null && statusAdapter.getItemCount() > position && position > 0) {
Status status = statusAdapter.getItem(position); Status status = statusAdapter.getItem(position);
int indentation = (status.isFocused?1:indentationMax);
int start = (int) Helper.convertDpToPixel( int start = (int) Helper.convertDpToPixel(
6 * fontScale * CommentDecorationHelper.getIndentation(status.in_reply_to_id, statusList, indentationMax), 6 * fontScale * CommentDecorationHelper.getIndentation(status.in_reply_to_id, statusList, indentation),
_mContext); _mContext);
if (parent.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR) { if (parent.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR) {
@ -95,7 +95,9 @@ public class DividerDecoration extends RecyclerView.ItemDecoration {
int indentation = Math.min( int indentation = Math.min(
CommentDecorationHelper.getIndentation(status.in_reply_to_id, statusList, indentationMax), CommentDecorationHelper.getIndentation(status.in_reply_to_id, statusList, indentationMax),
indentationMax); indentationMax);
if(status.isFocused) {
indentation = 1;
}
if (indentation > 0) { if (indentation > 0) {
Paint paint = new Paint(); Paint paint = new Paint();
paint.setDither(false); paint.setDither(false);

View file

@ -214,7 +214,7 @@ public class FragmentMastodonContext extends Fragment {
binding.recyclerView.setLayoutManager(mLayoutManager); binding.recyclerView.setLayoutManager(mLayoutManager);
binding.recyclerView.setAdapter(statusAdapter); binding.recyclerView.setAdapter(statusAdapter);
binding.swipeContainer.setOnRefreshListener(() -> { binding.swipeContainer.setOnRefreshListener(() -> {
if (this.statuses.size() > 0 && !refresh) { if (!this.statuses.isEmpty() && !refresh) {
binding.swipeContainer.setRefreshing(true); binding.swipeContainer.setRefreshing(true);
pullToRefresh = true; pullToRefresh = true;
statusesVM.getContext(user_instance, user_token, focusedStatus.id) statusesVM.getContext(user_instance, user_token, focusedStatus.id)
@ -277,7 +277,7 @@ public class FragmentMastodonContext extends Fragment {
statusAdapter.notifyItemRangeRemoved(0, size); statusAdapter.notifyItemRangeRemoved(0, size);
statuses.add(focusedStatus); statuses.add(focusedStatus);
} }
if (context.ancestors.size() > 0) { if (!context.ancestors.isEmpty()) {
firstStatus = context.ancestors.get(0); firstStatus = context.ancestors.get(0);
} else { } else {
firstStatus = statuses.get(0); firstStatus = statuses.get(0);