Fix a crash when no toots are attached.

This commit is contained in:
tom79 2019-06-23 14:47:23 +02:00
parent bc8189e9c6
commit 827c193cd6
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ public class ReportsListAdapter extends RecyclerView.Adapter implements OnRetrie
private void notifyAccountChanged(Account account){
for (int i = 0; i < reportsListAdapter.getItemCount(); i++) {
//noinspection ConstantConditions
if (reportsListAdapter.getItemAt(i) != null && reportsListAdapter.getItemAt(i).getStatuses().get(0).getAccount().getId().equals(account.getId())) {
if (reportsListAdapter.getItemAt(i) != null && reportsListAdapter.getItemAt(i).getStatuses().size() > 0 && reportsListAdapter.getItemAt(i).getStatuses().get(0).getAccount().getId().equals(account.getId())) {
try {
reportsListAdapter.notifyItemChanged(i);
} catch (Exception ignored) {