fix crash because of null visibility (#1478)

* fix crash because of null visibility

* fix crash because of null visibility
This commit is contained in:
Konrad Pozniak 2019-09-12 20:03:07 +02:00 committed by GitHub
parent 9b8b036974
commit c04c51ce41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -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:

View File

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