fix wrong time/username reference when replying
This commit is contained in:
parent
2fafdcc4f8
commit
c3d9147705
|
@ -673,10 +673,11 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
|||
? UiUtils.formatRelativeTimestamp(getContext(), status.createdAt)
|
||||
: getString(R.string.edited_timestamp, UiUtils.formatRelativeTimestamp(getContext(), status.editedAt));
|
||||
|
||||
String sepp = getString(R.string.sk_separator);
|
||||
String username = status.account.getDisplayUsername();
|
||||
((TextView) view.findViewById(R.id.time_and_username)).setText(time == null ? username :
|
||||
username + " " + sepp + " " + time);
|
||||
((TextView) view.findViewById(R.id.username)).setText(status.account.getDisplayUsername());
|
||||
view.findViewById(R.id.separator).setVisibility(time==null ? View.GONE : View.VISIBLE);
|
||||
view.findViewById(R.id.time).setVisibility(time==null ? View.GONE : View.VISIBLE);
|
||||
if(time!=null) ((TextView) view.findViewById(R.id.time)).setText(time);
|
||||
|
||||
if (status.spoilerText != null && !status.spoilerText.isBlank()) {
|
||||
TextView replyToSpoiler = view.findViewById(R.id.reply_to_spoiler);
|
||||
replyToSpoiler.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -317,7 +317,7 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
|
|||
else if (item.status != null && item.status.editedAt != null)
|
||||
time=item.parentFragment.getString(R.string.edited_timestamp, UiUtils.formatRelativeTimestamp(itemView.getContext(), item.status.editedAt));
|
||||
|
||||
this.username.setText("@" + item.user.acct);
|
||||
this.username.setText(item.user.getDisplayUsername());
|
||||
this.timeUsernameSeparator.setVisibility(time==null ? View.GONE : View.VISIBLE);
|
||||
this.time.setVisibility(time==null ? View.GONE : View.VISIBLE);
|
||||
if(time!=null) this.time.setText(time);
|
||||
|
|
Loading…
Reference in New Issue