mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-07-13 15:10:28 +03:00
Fix a crash with threads
This commit is contained in:
parent
cf022002c5
commit
f7ac7c5b49
2 changed files with 5 additions and 2 deletions
|
@ -118,7 +118,8 @@ public class DividerDecoration extends RecyclerView.ItemDecoration {
|
|||
|
||||
c.drawLine(startPx, view.getTop() - margin, startPx, bottomPx, paint);
|
||||
}
|
||||
int color = colorList.get(indentation%colorList.size()-1);
|
||||
int indexColor = indentation%colorList.size();
|
||||
int color = colorList.get(indexColor > 0 ? indexColor-1:0);
|
||||
paint.setColor(ResourcesCompat.getColor(_mContext.getResources(), color, _mContext.getTheme()));
|
||||
|
||||
float startDp = 6 * fontScale * (indentation - 1) + 6 * fontScale;
|
||||
|
|
|
@ -127,7 +127,9 @@ public class DividerDecorationSimple extends RecyclerView.ItemDecoration {
|
|||
|
||||
c.drawLine(startPx, view.getTop() - margin, startPx, bottomPx, paint);
|
||||
}
|
||||
int color = colorList.get(indentation%colorList.size()-1);
|
||||
int indexColor = indentation%colorList.size();
|
||||
|
||||
int color = colorList.get(indexColor > 0 ? indexColor-1:0);
|
||||
paint.setColor(ResourcesCompat.getColor(_mContext.getResources(), color, _mContext.getTheme()));
|
||||
|
||||
float startDp = 6 * fontScale * (indentation - 1) + 6 * fontScale;
|
||||
|
|
Loading…
Reference in a new issue