Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix、修复BaseNodeAdapter 移除某个节点后,调用expandAndCollapseOther方法报IndexOutOfBoundsException问题 #3808

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,22 @@ var ossrhPassword = "" //sonatype密码

val localProperties: File = project.rootProject.file("local.properties")

if (localProperties.exists()) {
println("Found secret props file, loading props")
val properties = Properties()

InputStreamReader(FileInputStream(localProperties), Charsets.UTF_8).use { reader ->
properties.load(reader)
}
signingKeyId = properties.getProperty("signing.keyId")
signingPassword = properties.getProperty("signing.password")
secretKeyRingFile = properties.getProperty("signing.secretKeyRingFile")
ossrhUsername = properties.getProperty("ossrhUsername")
ossrhPassword = properties.getProperty("ossrhPassword")

} else {
//if (localProperties.exists()) {
// println("Found secret props file, loading props")
// val properties = Properties()
//
// InputStreamReader(FileInputStream(localProperties), Charsets.UTF_8).use { reader ->
// properties.load(reader)
// }
// signingKeyId = properties.getProperty("signing.keyId")
// signingPassword = properties.getProperty("signing.password")
// secretKeyRingFile = properties.getProperty("signing.secretKeyRingFile")
// ossrhUsername = properties.getProperty("ossrhUsername")
// ossrhPassword = properties.getProperty("ossrhPassword")

//} else {
println("No props file, loading env vars")
}
//}

afterEvaluate {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ abstract class BaseNodeAdapter(nodeList: MutableList<BaseNode>? = null)
data.size - 1 // 如果没有父节点,则为最外层
} else {
val dataSize = data[parentPosition].childNode?.size ?: 0
parentPosition + dataSize + expandCount // 如果有父节点,则为子节点,父节点 + 子节点数量 + 展开的数量
parentPosition + dataSize + expandCount -1
// 如果有父节点,则为子节点,父节点 + 子节点数量 + 展开的数量
}

//如果此 position 之后有 node
Expand Down