mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
Homeの場合の更新時刻表示をライブラリと統一
This commit is contained in:
parent
6693275dd9
commit
c095b50bf5
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user