Skip to content

Commit

Permalink
Merge pull request #277 from vimeo/new_notifications_field
Browse files Browse the repository at this point in the history
Add new type_unseen_count filed to notifications connections object
  • Loading branch information
brentwatson authored Jan 17, 2018
2 parents d8fdb86 + 1572b23 commit bc95f48
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@UseStag(FieldOption.SERIALIZED_NAME)
public class NotificationConnection extends Connection {

private static final long serialVersionUID = 4908222195478449252L;
private static final long serialVersionUID = -8043872922883259170L;

@SerializedName("new_total")
protected int mNewTotal;
Expand All @@ -51,6 +51,10 @@ public class NotificationConnection extends Connection {
@SerializedName("type_count")
protected NotificationTypeCount mTypeCount;

@Nullable
@SerializedName("type_unseen_count")
protected NotificationTypeCount mTypeUnseenCount;

public int getNewTotal() {
return mNewTotal;
}
Expand All @@ -64,6 +68,11 @@ public NotificationTypeCount getTypeCount() {
return mTypeCount;
}

@Nullable
public NotificationTypeCount getTypeUnseenCount() {
return mTypeUnseenCount;
}

@Override
public boolean equals(Object o) {
if (this == o) { return true; }
Expand All @@ -75,6 +84,7 @@ public boolean equals(Object o) {
if (mUnreadTotal != that.mUnreadTotal) { return false; }
if (mTotal != that.mTotal) { return false; }
if (mTypeCount != null ? !mTypeCount.equals(that.mTypeCount) : that.mTypeCount != null) { return false; }
if (mTypeUnseenCount != null ? !mTypeUnseenCount.equals(that.mTypeUnseenCount) : that.mTypeUnseenCount != null) { return false; }
return mUri != null ? mUri.equals(that.mUri) : that.mUri == null;

}
Expand All @@ -84,6 +94,7 @@ public int hashCode() {
int result = mNewTotal;
result = 31 * result + mUnreadTotal;
result = 31 * result + (mTypeCount != null ? mTypeCount.hashCode() : 0);
result = 31 * result + (mTypeUnseenCount != null ? mTypeUnseenCount.hashCode() : 0);
result = 31 * result + (mUri != null ? mUri.hashCode() : 0);
result = 31 * result + mTotal;
return result;
Expand All @@ -95,6 +106,7 @@ public String toString() {
"newTotal=" + mNewTotal +
", unreadTotal=" + mUnreadTotal +
", mTypeCount=" + mTypeCount +
", mTypeUnseenCount=" + mTypeUnseenCount +
", uri='" + mUri + '\'' +
", total=" + mTotal +
'}';
Expand Down

0 comments on commit bc95f48

Please sign in to comment.