X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FCore.java;h=e61a58f8d6bd77fa07bac4986869e9624395e72c;hp=4e7f18ddfc85bfc4bc555680e00c15d325f2c0bb;hb=f0c0d175ae5058661d3af7cc99d0c188616a4d8f;hpb=1f15b9eae9ca9453452f16b1cc76e05b3bcfb696 diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 4e7f18d..e61a58f 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1224,7 +1224,7 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, followSone(sone, friendId); } for (Album album : sone.getRootAlbum().getAlbums()) { - sone.getRootAlbum().removeAlbum(album); + album.remove(); } soneInserters.get(sone).setLastInsertFingerprint(lastInsertFingerprint); } @@ -1483,24 +1483,6 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, } /** - * Deletes the given album. The owner of the album has to be a local Sone, and - * the album has to be {@link Album#isEmpty() empty} to be deleted. - * - * @param album - * The album to remove - */ - public void deleteAlbum(Album album) { - checkNotNull(album, "album must not be null"); - checkArgument(album.getSone().isLocal(), "album’s Sone must be a local Sone"); - if (!album.isEmpty()) { - return; - } - album.getParent().removeAlbum(album); - database.removeAlbum(album); - touchConfiguration(); - } - - /** * Creates a new image. * * @param sone