Fixes direct messages falsely being shown as able to be boosted.
This commit is contained in:
parent
d8a5ec3132
commit
88df8216a6
|
@ -382,7 +382,7 @@ class StatusViewHolder extends RecyclerView.ViewHolder {
|
|||
hideSensitiveMediaWarning();
|
||||
}
|
||||
setupButtons(listener, realStatus.account.id);
|
||||
setRebloggingEnabled(realStatus.visibility != Status.Visibility.PRIVATE);
|
||||
setRebloggingEnabled(status.rebloggingAllowed());
|
||||
if (realStatus.spoilerText.isEmpty()) {
|
||||
hideSpoilerText();
|
||||
} else {
|
||||
|
|
|
@ -47,12 +47,15 @@ public class Status {
|
|||
}
|
||||
|
||||
public enum Visibility {
|
||||
UNKNOWN,
|
||||
@SerializedName("public")
|
||||
PUBLIC,
|
||||
@SerializedName("unlisted")
|
||||
UNLISTED,
|
||||
@SerializedName("private")
|
||||
PRIVATE,
|
||||
@SerializedName("direct")
|
||||
DIRECT,
|
||||
}
|
||||
|
||||
public String id;
|
||||
|
@ -81,6 +84,13 @@ public class Status {
|
|||
return visibility == null ? Visibility.UNLISTED : visibility;
|
||||
}
|
||||
|
||||
public boolean rebloggingAllowed() {
|
||||
return visibility != null
|
||||
&& visibility != Visibility.PRIVATE
|
||||
&& visibility != Visibility.DIRECT
|
||||
&& visibility != Visibility.UNKNOWN;
|
||||
}
|
||||
|
||||
@SerializedName("media_attachments")
|
||||
public MediaAttachment[] attachments;
|
||||
|
||||
|
|
Loading…
Reference in New Issue