diff --git a/data/src/main/java/one/nem/lacerta/data/LacertaLibrary.java b/data/src/main/java/one/nem/lacerta/data/LacertaLibrary.java index e1ce346e..46728e2d 100644 --- a/data/src/main/java/one/nem/lacerta/data/LacertaLibrary.java +++ b/data/src/main/java/one/nem/lacerta/data/LacertaLibrary.java @@ -28,6 +28,9 @@ public interface LacertaLibrary { // Create Folder CompletableFuture createFolder(String parentId, String name); + // delete Folder + CompletableFuture deleteFolder(String folderId); + // Get Public Path CompletableFuture getPublicPath(String itemId, ListItemType itemType); diff --git a/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java index 0df061f9..94ff9a1a 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java @@ -207,6 +207,14 @@ public class LacertaLibraryImpl implements LacertaLibrary { }); } + @Override + public CompletableFuture deleteFolder(String folderId) { + return CompletableFuture.supplyAsync(() -> { + database.folderDao().deleteById(folderId); + return null; + }); + } + @Override public CompletableFuture getPublicPath(String itemId, ListItemType itemType) { return CompletableFuture.supplyAsync(() -> {