followSone(sone, friendId);
}
for (Album album : sone.getRootAlbum().getAlbums()) {
- sone.getRootAlbum().removeAlbum(album);
+ album.remove();
}
soneInserters.get(sone).setLastInsertFingerprint(lastInsertFingerprint);
}
}
/**
- * 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