Homeの場合の更新時刻表示をライブラリと統一

This commit is contained in:
ろむねこ 2024-01-29 10:50:39 +09:00
parent 6693275dd9
commit c095b50bf5
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -50,12 +50,13 @@ public class LacertaLibraryImpl implements LacertaLibrary {
return CompletableFuture.supplyAsync(() -> { return CompletableFuture.supplyAsync(() -> {
List<DocumentEntity> documentEntities = database.documentDao().getRecentDocument(limit); List<DocumentEntity> documentEntities = database.documentDao().getRecentDocument(limit);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
ArrayList<ListItem> listItems = new ArrayList<>(); ArrayList<ListItem> listItems = new ArrayList<>();
for (DocumentEntity documentEntity : documentEntities) { for (DocumentEntity documentEntity : documentEntities) {
ListItem listItem = new ListItem(); ListItem listItem = new ListItem();
listItem.setItemType(ListItemType.ITEM_TYPE_DOCUMENT); listItem.setItemType(ListItemType.ITEM_TYPE_DOCUMENT);
listItem.setTitle(documentEntity.title); listItem.setTitle(documentEntity.title);
listItem.setDescription(DateFormat.getDateInstance().format(documentEntity.updatedAt)); listItem.setDescription(simpleDateFormat.format(documentEntity.updatedAt));
listItem.setItemId(documentEntity.id); listItem.setItemId(documentEntity.id);
listItem.setHasCombined(documentEntity.isCombineParent); listItem.setHasCombined(documentEntity.isCombineParent);
listItems.add(listItem); listItems.add(listItem);