Skip to content

Commit 4655885

Browse files
committed
feat: 版本列表自动滑动到当前选择的版本
1 parent 10d8292 commit 4655885

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

FCL/src/main/java/com/tungsten/fcl/ui/version/VersionListPage.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ class VersionListPage(context: Context?, id: Int, parent: FCLUILayout?, resId: I
163163
binding.versionList.visibility = View.VISIBLE
164164
binding.progress.visibility = View.GONE
165165
binding.search.addTextChangedListener(textWatcher)
166+
val selected = children.find { it.selectedProperty().get() }
167+
if (selected != null) {
168+
binding.versionList.setSelection(children.indexOf(selected))
169+
}
166170
}
167171
children.forEach {
168172
it.selectedProperty().bind(

0 commit comments

Comments
 (0)