this.event = (Event) event.getDropValue();
// check if the album is already shared
if (this.event.getGooglePlusAlbumIds().contains(albumId)) {
setAlbumAlreadyShared(true);
error.fire(new ErrorEvent("This album is already shared in this event"));
return;
}
String albumName = "";
try {
albumName = gpac.getAlbum(albumId).getString("name");
} catch (JSONException e) {
// nothing, the exception will not be thrown
}
for (Album album : this.event.getShelf().getAlbums()) {
if (album.getName() == albumName) {
setAlbumAlreadyShared(true);
error.fire(new ErrorEvent("Album with this name has already been imported to this event"));
return;
}
}
setAlbumAlreadyShared(false);