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