fixed ParcelableStatusUpdate json serialization

This commit is contained in:
Mariotaku Lee 2017-06-09 19:07:02 +08:00
parent bbb14674c2
commit 11b7b4a4dc
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
2 changed files with 9 additions and 1 deletions

View File

@ -89,7 +89,6 @@ public class ParcelableStatusUpdate implements Parcelable {
@ParcelableThisPlease
@Draft.Action
public String draft_action;
@JsonField(name = "draft_extras")
@ParcelableThisPlease
@Nullable
public ActionExtras draft_extras;
@ -111,6 +110,14 @@ public class ParcelableStatusUpdate implements Parcelable {
", in_reply_to_status=" + in_reply_to_status +
", is_possibly_sensitive=" + is_possibly_sensitive +
", repost_status_id='" + repost_status_id + '\'' +
", attachment_url='" + attachment_url + '\'' +
", excluded_reply_user_ids=" + Arrays.toString(excluded_reply_user_ids) +
", extended_reply_mode=" + extended_reply_mode +
", summary='" + summary + '\'' +
", visibility='" + visibility + '\'' +
", draft_unique_id='" + draft_unique_id + '\'' +
", draft_action='" + draft_action + '\'' +
", draft_extras=" + draft_extras +
'}';
}

View File

@ -80,6 +80,7 @@ public class DraftExtrasFieldConverter implements CursorFieldConverter<ActionExt
}
public static String serializeExtras(final ActionExtras object) throws IOException {
if (object == null) return null;
return LoganSquare.serialize(object);
}
}