Fix crash when status date is null (#1480)
* Fix crash when status date is null * Fix crash when status date is null
This commit is contained in:
parent
c04c51ce41
commit
29ea05a0e5
2 changed files with 30 additions and 15 deletions
|
|
@ -67,9 +67,13 @@ class StatusDetailedViewHolder extends StatusBaseViewHolder {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void setCreatedAt(@NonNull Date createdAt) {
|
||||
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.SHORT);
|
||||
timestampInfo.setText(dateFormat.format(createdAt));
|
||||
protected void setCreatedAt(Date createdAt) {
|
||||
if(createdAt == null) {
|
||||
timestampInfo.setText("");
|
||||
} else {
|
||||
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.SHORT);
|
||||
timestampInfo.setText(dateFormat.format(createdAt));
|
||||
}
|
||||
}
|
||||
|
||||
private void setReblogAndFavCount(int reblogCount, int favCount, StatusActionListener listener) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue