mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-27 03:18:24 +01:00
This commit is contained in:
parent
a288a638b5
commit
1bcbbbecc9
@ -460,14 +460,10 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
|||||||
((CommentViewHolder) holder).scoreTextView.setText(mActivity.getString(R.string.vote));
|
((CommentViewHolder) holder).scoreTextView.setText(mActivity.getString(R.string.vote));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(comment.isEdited()){
|
if (comment.isEdited()) {
|
||||||
((CommentViewHolder) holder).editedView.setText(R.string.edited);
|
((CommentViewHolder) holder).editedTextView.setVisibility(View.VISIBLE);
|
||||||
((CommentViewHolder) holder).editedView.setOnClickListener(view -> {
|
} else {
|
||||||
Toast.makeText(view.getContext(), view.getContext().getString(R.string.edited_time, mShowElapsedTime ?
|
((CommentViewHolder) holder).editedTextView.setVisibility(View.GONE);
|
||||||
Utils.getElapsedTime(mActivity, comment.getEditedTimeMillis()) :
|
|
||||||
Utils.getFormattedTime(mLocale, comment.getEditedTimeMillis(), mTimeFormatPattern)
|
|
||||||
), Toast.LENGTH_SHORT).show();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
((CommentViewHolder) holder).commentIndentationView.setShowOnlyOneDivider(mShowOnlyOneCommentLevelIndicator);
|
((CommentViewHolder) holder).commentIndentationView.setShowOnlyOneDivider(mShowOnlyOneCommentLevelIndicator);
|
||||||
@ -1192,7 +1188,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
|||||||
@BindView(R.id.comment_markdown_view_item_post_comment)
|
@BindView(R.id.comment_markdown_view_item_post_comment)
|
||||||
RecyclerView commentMarkdownView;
|
RecyclerView commentMarkdownView;
|
||||||
@BindView(R.id.edited_text_view_item_post_comment)
|
@BindView(R.id.edited_text_view_item_post_comment)
|
||||||
TextView editedView;
|
TextView editedTextView;
|
||||||
@BindView(R.id.bottom_constraint_layout_item_post_comment)
|
@BindView(R.id.bottom_constraint_layout_item_post_comment)
|
||||||
ConstraintLayout bottomConstraintLayout;
|
ConstraintLayout bottomConstraintLayout;
|
||||||
@BindView(R.id.up_vote_button_item_post_comment)
|
@BindView(R.id.up_vote_button_item_post_comment)
|
||||||
@ -1318,6 +1314,16 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
|||||||
|
|
||||||
authorFlairTextView.setOnClickListener(view -> authorTextView.performClick());
|
authorFlairTextView.setOnClickListener(view -> authorTextView.performClick());
|
||||||
|
|
||||||
|
editedTextView.setOnClickListener(view -> {
|
||||||
|
Comment comment = getCurrentComment(this);
|
||||||
|
if (comment != null) {
|
||||||
|
Toast.makeText(view.getContext(), view.getContext().getString(R.string.edited_time, mShowElapsedTime ?
|
||||||
|
Utils.getElapsedTime(mActivity, comment.getEditedTimeMillis()) :
|
||||||
|
Utils.getFormattedTime(mLocale, comment.getEditedTimeMillis(), mTimeFormatPattern)
|
||||||
|
), Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
moreButton.setOnClickListener(view -> {
|
moreButton.setOnClickListener(view -> {
|
||||||
getItemCount();
|
getItemCount();
|
||||||
Comment comment = getCurrentComment(this);
|
Comment comment = getCurrentComment(this);
|
||||||
|
@ -75,7 +75,9 @@
|
|||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:fontFamily="?attr/font_family"
|
android:fontFamily="?attr/font_family"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
|
android:text="@string/edited"
|
||||||
android:textSize="?attr/font_default"
|
android:textSize="?attr/font_default"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/top_score_text_view_item_post_comment"
|
app:layout_constraintEnd_toStartOf="@id/top_score_text_view_item_post_comment"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
Loading…
Reference in New Issue
Block a user