aboutsummaryrefslogtreecommitdiff
path: root/WordPress/src/main/java/org/wordpress/android/ui/comments/CommentActionResult.java
blob: 41178da31a1cfd98f257dca53d92e21dcd7b1a58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package org.wordpress.android.ui.comments;

public class CommentActionResult {

    public static final int COMMENT_ID_ON_ERRORS = -1;
    public static final int COMMENT_ID_UNKNOWN = -2; // This is used primarily for replies, when the commentID isn't known.

    private long mCommentID = COMMENT_ID_UNKNOWN;
    private final String mMessage;

    public CommentActionResult(long commentID, String message) {
        mCommentID = commentID;
        mMessage = message;
    }

    public String getMessage() { return mMessage; }
    public boolean isSuccess() { return mCommentID != COMMENT_ID_ON_ERRORS; }
}