Skip to content

Commit

Permalink
Analysis: Resolve name shadowed warning
Browse files Browse the repository at this point in the history
Warning Message: "Name shadowed: start"
  • Loading branch information
ParaskP7 committed Nov 17, 2022
1 parent 1e7f4a9 commit 96c9668
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ open class AztecOrderedListSpan(
p.color = listStyle.indicatorColor
p.style = Paint.Style.FILL

val start = if (attributes.hasAttribute("start") == true) {
val startAttribute = if (attributes.hasAttribute("start") == true) {
attributes.getValue("start").toInt()
} else {
0
Expand All @@ -92,9 +92,9 @@ open class AztecOrderedListSpan(
var textToDraw = ""
getIndexOfProcessedLine(text, end)?.let {
val isReversed = attributes.hasAttribute("reversed")
val lineIndex = if (start > 0) {
if (isReversed) start - (it - 1)
else start + (it - 1)
val lineIndex = if (startAttribute > 0) {
if (isReversed) startAttribute - (it - 1)
else startAttribute + (it - 1)
} else {
val number = getNumberOfItemsInProcessedLine(text)
if (isReversed) number - (it - 1)
Expand Down

0 comments on commit 96c9668

Please sign in to comment.