diff --git a/pixleesdk/src/main/java/com/pixlee/pixleesdk/data/PXLPhoto.java b/pixleesdk/src/main/java/com/pixlee/pixleesdk/data/PXLPhoto.java index e7587eed..1f75a7c8 100644 --- a/pixleesdk/src/main/java/com/pixlee/pixleesdk/data/PXLPhoto.java +++ b/pixleesdk/src/main/java/com/pixlee/pixleesdk/data/PXLPhoto.java @@ -297,6 +297,9 @@ public Integer sourceIconImage() { } + public PXLPhoto() { + } + @Override public int describeContents() { return 0; @@ -326,6 +329,7 @@ public void writeToParcel(Parcel dest, int flags) { dest.writeInt(this.existIn); dest.writeString(this.collectTerm); dest.writeString(this.albumPhotoId); + dest.writeInt(this.albumId); dest.writeInt(this.likeCount); dest.writeInt(this.shareCount); dest.writeSerializable(this.actionLink); @@ -346,11 +350,11 @@ public void writeToParcel(Parcel dest, int flags) { dest.writeByte(this.instUserHasLiked ? (byte) 1 : (byte) 0); dest.writeSerializable(this.platformLink); dest.writeTypedList(this.products); + dest.writeString(this.uploaderAdditionalFields!=null ? this.uploaderAdditionalFields.toString() : "{}"); dest.writeParcelable(this.cdnPhotos, flags); } - public PXLPhoto() { - } + protected PXLPhoto(Parcel in) { this.id = in.readString(); @@ -376,6 +380,7 @@ protected PXLPhoto(Parcel in) { this.existIn = in.readInt(); this.collectTerm = in.readString(); this.albumPhotoId = in.readString(); + this.albumId = in.readInt(); this.likeCount = in.readInt(); this.shareCount = in.readInt(); this.actionLink = (URL) in.readSerializable(); @@ -397,10 +402,15 @@ protected PXLPhoto(Parcel in) { this.instUserHasLiked = in.readByte() != 0; this.platformLink = (URL) in.readSerializable(); this.products = in.createTypedArrayList(PXLProduct.CREATOR); + try { + this.uploaderAdditionalFields = new JSONObject(in.readString()); + } catch (Exception e) { + e.printStackTrace(); + } this.cdnPhotos = in.readParcelable(CDNPhotos.class.getClassLoader()); } - public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public static final Creator CREATOR = new Creator() { @Override public PXLPhoto createFromParcel(Parcel source) { return new PXLPhoto(source);