fix crash because of null visibility (#1478)

* fix crash because of null visibility

* fix crash because of null visibility
main
Konrad Pozniak 5 years ago committed by GitHub
parent feeeb4b268
commit 83311b7f08
  1. 4
      app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java
  2. 4
      app/src/main/java/com/keylesspalace/tusky/adapter/StatusDetailedViewHolder.java

@ -729,6 +729,10 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
private static CharSequence getVisibilityDescription(Context context, Status.Visibility visibility) {
if(visibility == null) {
return "";
}
int resource;
switch (visibility) {
case PUBLIC:

@ -221,6 +221,10 @@ class StatusDetailedViewHolder extends StatusBaseViewHolder {
private void setStatusVisibility(Status.Visibility visibility) {
if(visibility == null) {
return;
}
int visibilityIcon;
switch (visibility) {
case PUBLIC:

Loading…
Cancel
Save