1
0
Fork 1

index bounds guard

Shouldn't be needed... but just in case, better than a crash

(cherry picked from commit 3014b2e034e964681190d6997b23395b9af1ddfa)
This commit is contained in:
Stephen Paul Weber 2024-11-02 20:56:58 -05:00 committed by Arne
parent 59f0583cad
commit fc3ba1b6e2

View file

@ -339,7 +339,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
}
}
items.subList(endOfMainFilters, endOfMainFilters + tags.size()).sort((x, y) -> x.getTag() == null ? -1 : ((Comparable) x.getTag()).compareTo(y.getTag()));
items.subList(endOfMainFilters, Math.min(endOfMainFilters + tags.size(), items.size())).sort((x, y) -> x.getTag() == null ? -1 : ((Comparable) x.getTag()).compareTo(y.getTag()));
binding.drawer.getItemAdapter().getFastAdapter().notifyDataSetChanged();
return kotlin.Unit.INSTANCE;
});