LoggerをInject(など)

This commit is contained in:
r-ca 2023-12-18 01:39:44 +09:00
parent 37bc68fef9
commit 85206956e7
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -19,6 +19,7 @@ import one.nem.lacerta.data.Document;
import one.nem.lacerta.feature.debug.common.adapter.DebugMenuDocumentListItemAdapter; import one.nem.lacerta.feature.debug.common.adapter.DebugMenuDocumentListItemAdapter;
import one.nem.lacerta.feature.debug.common.model.DebugMenuDocumentListItem; import one.nem.lacerta.feature.debug.common.model.DebugMenuDocumentListItem;
import one.nem.lacerta.model.document.DocumentMeta; import one.nem.lacerta.model.document.DocumentMeta;
import one.nem.lacerta.utils.LacertaLogger;
/** /**
* A simple {@link Fragment} subclass. * A simple {@link Fragment} subclass.
@ -32,6 +33,9 @@ public class DebugMenuDocumentTesterListFragment extends Fragment {
@Inject @Inject
Document document; Document document;
@Inject
LacertaLogger logger;
public DebugMenuDocumentTesterListFragment() { public DebugMenuDocumentTesterListFragment() {
// Required empty public constructor // Required empty public constructor
} }
@ -59,14 +63,18 @@ public class DebugMenuDocumentTesterListFragment extends Fragment {
ArrayList<DocumentMeta> documentMetas = document.getAllDocumentMetas(100); ArrayList<DocumentMeta> documentMetas = document.getAllDocumentMetas(100);
ArrayList<DebugMenuDocumentListItem> debugMenuDocumentListItems = new ArrayList<>(); ArrayList<DebugMenuDocumentListItem> debugMenuDocumentListItems = new ArrayList<>();
for (DocumentMeta documentMeta : documentMetas) { for (DocumentMeta documentMeta : documentMetas) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
debugMenuDocumentListItems.add(new DebugMenuDocumentListItem(documentMeta.getTitle(), "Internal Id: " + documentMeta.getId(), simpleDateFormat.format(documentMeta.getUpdatedAt()))); debugMenuDocumentListItems.add(new DebugMenuDocumentListItem(documentMeta.getTitle(), "Internal Id: " + documentMeta.getId(), simpleDateFormat.format(documentMeta.getUpdatedAt())));
} }
DebugMenuDocumentListItemAdapter adapter = new DebugMenuDocumentListItemAdapter(debugMenuDocumentListItems);
recyclerView.setAdapter(adapter);
return view; return view;
} }
} }