aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/customviews/CommentIndentationView.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/CommentIndentationView.java b/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/CommentIndentationView.java
index 07697075..fc9dba03 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/CommentIndentationView.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/CommentIndentationView.java
@@ -80,8 +80,12 @@ public class CommentIndentationView extends LinearLayout {
public void setLevelAndColors(int level, Integer[] colors) {
this.colors = colors;
this.level = level;
- int indentationSpacing = (level * spacing + pathWidth);
- setPaddingRelative(indentationSpacing, 0, pathWidth, 0);
+ if (level > 0) {
+ int indentationSpacing = level * spacing + pathWidth;
+ setPaddingRelative(indentationSpacing, 0, pathWidth, 0);
+ } else {
+ setPaddingRelative(0, 0, 0, 0);
+ }
invalidate();
}