Save reply info in draft, refactor (#449)
* Save reply info in draft, refactor * Handle replying to deleted status
This commit is contained in:
parent
a859ef0432
commit
2575b16dad
15 changed files with 575 additions and 390 deletions
|
|
@ -50,15 +50,45 @@ public class Status {
|
|||
}
|
||||
|
||||
public enum Visibility {
|
||||
UNKNOWN,
|
||||
UNKNOWN(0),
|
||||
@SerializedName("public")
|
||||
PUBLIC,
|
||||
PUBLIC(1),
|
||||
@SerializedName("unlisted")
|
||||
UNLISTED,
|
||||
UNLISTED(2),
|
||||
@SerializedName("private")
|
||||
PRIVATE,
|
||||
PRIVATE(3),
|
||||
@SerializedName("direct")
|
||||
DIRECT,
|
||||
DIRECT(4);
|
||||
|
||||
private final int num;
|
||||
|
||||
Visibility(int num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public int getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public static Visibility byNum(int num) {
|
||||
switch (num) {
|
||||
case 4: return DIRECT;
|
||||
case 3: return PRIVATE;
|
||||
case 2: return UNLISTED;
|
||||
case 1: return PUBLIC;
|
||||
case 0: default: return UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
public String serverString() {
|
||||
switch (this) {
|
||||
case PUBLIC: return "public";
|
||||
case UNLISTED: return "unlisted";
|
||||
case PRIVATE: return "private";
|
||||
case DIRECT: return "direct";
|
||||
case UNKNOWN: default: return "unknown";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String id;
|
||||
|
|
@ -162,7 +192,7 @@ public class Status {
|
|||
}
|
||||
}
|
||||
|
||||
public static class Mention {
|
||||
public static final class Mention {
|
||||
public String id;
|
||||
|
||||
public String url;
|
||||
|
|
@ -179,6 +209,7 @@ public class Status {
|
|||
public String website;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static class Emoji {
|
||||
private String shortcode;
|
||||
private String url;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue