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
|
@ -729,6 +729,10 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
private static CharSequence getVisibilityDescription(Context context, Status.Visibility visibility) {
|
private static CharSequence getVisibilityDescription(Context context, Status.Visibility visibility) {
|
||||||
|
|
||||||
|
if(visibility == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
int resource;
|
int resource;
|
||||||
switch (visibility) {
|
switch (visibility) {
|
||||||
case PUBLIC:
|
case PUBLIC:
|
||||||
|
|
|
@ -221,6 +221,10 @@ class StatusDetailedViewHolder extends StatusBaseViewHolder {
|
||||||
|
|
||||||
private void setStatusVisibility(Status.Visibility visibility) {
|
private void setStatusVisibility(Status.Visibility visibility) {
|
||||||
|
|
||||||
|
if(visibility == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int visibilityIcon;
|
int visibilityIcon;
|
||||||
switch (visibility) {
|
switch (visibility) {
|
||||||
case PUBLIC:
|
case PUBLIC:
|
||||||
|
|
Loading…
Reference in New Issue