mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
Revの作成日時を表示できるように
This commit is contained in:
parent
e69d489a96
commit
56a49d4c7e
|
@ -8,6 +8,7 @@ import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -40,13 +41,14 @@ public class RevAdapter extends RecyclerView.Adapter<RevAdapter.RevViewHolder>{
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull RevAdapter.RevViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull RevAdapter.RevViewHolder holder, int position) {
|
||||||
VcsRevModel revModel = revModels.get(position);
|
VcsRevModel revModel = revModels.get(position);
|
||||||
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
|
||||||
holder.title.setText(revModel.getCommitMessage());
|
holder.title.setText(revModel.getCommitMessage());
|
||||||
if (FeatureSwitch.Vcs.disableBranchDisplay) {
|
if (FeatureSwitch.Vcs.disableBranchDisplay) {
|
||||||
// holder.detail.setText(DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(revModel.getCreatedAt().toInstant()));
|
// holder.detail.setText(DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(revModel.getCreatedAt().toInstant()));
|
||||||
holder.detail.setText("DateTimePlaceholder");
|
holder.detail.setText(simpleDateFormat.format(revModel.getCreatedAt()));
|
||||||
} else {
|
} else {
|
||||||
// holder.detail.setText(DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(revModel.getCreatedAt().toInstant()) + " " + revModel.getBranchName());
|
// 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());
|
holder.revId.setText("RevID: " + revModel.getId());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user