This commit is contained in:
r-ca 2023-12-16 16:39:23 +09:00
parent 76c0fc1fe7
commit 8f1b47d4c4
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -19,6 +19,7 @@ import one.nem.lacerta.source.database.entity.LibraryEntity;
import one.nem.lacerta.source.database.entity.TagEntity;
import one.nem.lacerta.source.jgit.JGitRepository;
import one.nem.lacerta.utils.repository.DeviceInfoUtils;
public class DocumentImpl implements Document{
@ -33,6 +34,9 @@ public class DocumentImpl implements Document{
@Inject
JGitRepository jGitRepository;
@Inject
DeviceInfoUtils deviceInfoUtils;
@Override
public ArrayList<DocumentMeta> getRecentDocumentMetas(int limit) {
// ArrayList<DocumentMeta> documentMetas = new ArrayList<>();
@ -91,6 +95,10 @@ public class DocumentImpl implements Document{
@Override
public DocumentDetail createDocumentByMeta(DocumentMeta meta) {
return null;
DocumentDetail documentDetail = new DocumentDetail();
documentDetail.setMeta(meta);
documentDetail.setAuthor("author"); // TODO-rca: SharedPrefを扱う機能を作ってそこから取得するようにする or Gitの設定を参照するようにする
documentDetail.setPath(new DocumentPath(deviceInfoUtils.getExternalStorageDirectory(), meta.getTitle())); // TODO-rca: パスの生成方法を考える
}
}