fix crash because of null visibility (#1478)
* fix crash because of null visibility * fix crash because of null visibility
This commit is contained in:
parent
9b8b036974
commit
c04c51ce41
2 changed files with 8 additions and 0 deletions
|
@ -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…
Reference in a new issue