fix crashes

This commit is contained in:
tom79 2019-06-15 16:38:45 +02:00
parent 6d4621d3bd
commit 6ca1692f2e
1 changed files with 7 additions and 3 deletions

View File

@ -541,10 +541,14 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder viewHolder, int i) {
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
final String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
final ViewHolder holder = (ViewHolder) viewHolder;
final Status status = statuses.get(viewHolder.getAdapterPosition());
if( viewHolder.getItemViewType() != HIDDEN_STATUS && status != null) {
if( viewHolder.getItemViewType() != HIDDEN_STATUS ) {
final ViewHolder holder = (ViewHolder) viewHolder;
final Status status = statuses.get(i);
if( status == null)
return;
//TODO:It sounds that sometimes this value is null - need deeper investigation
if (status.getVisibility() == null) {
status.setVisibility("public");