Stop initializing String.

This commit is contained in:
kyori 2018-08-20 17:47:19 +09:00
parent 219eafe6fc
commit b4bb80c4d5
2 changed files with 2 additions and 2 deletions

View File

@ -379,7 +379,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
protected void setCreatedAt(@Nullable Date createdAt) { protected void setCreatedAt(@Nullable Date createdAt) {
if (useAbsoluteTime) { if (useAbsoluteTime) {
String time = "ERROR!"; String time;
if (createdAt != null) { if (createdAt != null) {
SimpleDateFormat sdf; SimpleDateFormat sdf;
if (new Date().getTime() - createdAt.getTime() > 86400000L) { if (new Date().getTime() - createdAt.getTime() > 86400000L) {

View File

@ -133,7 +133,7 @@ abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
protected void setCreatedAt(@Nullable Date createdAt) { protected void setCreatedAt(@Nullable Date createdAt) {
if (useAbsoluteTime) { if (useAbsoluteTime) {
String time = "ERROR!"; String time;
if (createdAt != null) { if (createdAt != null) {
SimpleDateFormat sdf; SimpleDateFormat sdf;
if (new Date().getTime() - createdAt.getTime() > 86400000L) { if (new Date().getTime() - createdAt.getTime() > 86400000L) {