From 56a49d4c7e2de59a094e147efccd35626d2563e4 Mon Sep 17 00:00:00 2001 From: r-ca Date: Tue, 23 Jan 2024 05:17:53 +0900 Subject: [PATCH] =?UTF-8?q?Rev=E3=81=AE=E4=BD=9C=E6=88=90=E6=97=A5?= =?UTF-8?q?=E6=99=82=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=A7=E3=81=8D=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/component/viewer/RevAdapter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/RevAdapter.java b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/RevAdapter.java index bee4308d..eb5c634f 100644 --- a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/RevAdapter.java +++ b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/RevAdapter.java @@ -8,6 +8,7 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; +import java.text.SimpleDateFormat; import java.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -40,13 +41,14 @@ public class RevAdapter extends RecyclerView.Adapter{ @Override public void onBindViewHolder(@NonNull RevAdapter.RevViewHolder holder, int position) { VcsRevModel revModel = revModels.get(position); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); holder.title.setText(revModel.getCommitMessage()); if (FeatureSwitch.Vcs.disableBranchDisplay) { // holder.detail.setText(DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(revModel.getCreatedAt().toInstant())); - holder.detail.setText("DateTimePlaceholder"); + holder.detail.setText(simpleDateFormat.format(revModel.getCreatedAt())); } else { // holder.detail.setText(DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(revModel.getCreatedAt().toInstant()) + " " + revModel.getBranchName()); - holder.detail.setText("DateTimePlaceholder" + " " + revModel.getBranchName()); + holder.detail.setText(simpleDateFormat.format(revModel.getCreatedAt())+ " " + revModel.getBranchName()); } holder.revId.setText("RevID: " + revModel.getId());