File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
aztec/src/main/kotlin/org/wordpress/aztec/spans Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -37,26 +37,4 @@ abstract class AztecListSpan(val verticalPadding: Int) : LeadingMarginSpan.Stand
3737 return lineIndex + 1
3838 }
3939
40- fun getTotalNumberOfLines (text : CharSequence ): Int {
41- val spanStart = (text as Spanned ).getSpanStart(this )
42- val spanEnd = text.getSpanEnd(this )
43-
44- return text.substring(spanStart.. spanEnd - 2 ).split(" \n " ).count()
45- }
46-
47- fun getIndicatorAdjustment (text : CharSequence , end : Int ): Int {
48- var adjustment = 0
49-
50- val totalNumberOfLinesInList = getTotalNumberOfLines(text)
51- val currentLineNumber = getIndexOfProcessedLine(text, end)
52-
53- if (totalNumberOfLinesInList > 1 && currentLineNumber == 1 ) {
54- adjustment = 0
55- } else if ((totalNumberOfLinesInList > 1 && totalNumberOfLinesInList == currentLineNumber) || totalNumberOfLinesInList == 1 ) {
56- adjustment = - verticalPadding
57- }
58-
59- return adjustment
60- }
61-
6240}
You can’t perform that action at this time.
0 commit comments