Skip to content

Commit

Permalink
feat:优化搜索部分UI细节
Browse files Browse the repository at this point in the history
  • Loading branch information
Yricky committed Sep 26, 2024
1 parent a120923 commit 37b28b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ fun AbcUniSearchStateView(
cursorBrush = SolidColor(MaterialTheme.colorScheme.onSecondaryContainer),
modifier = Modifier.weight(1f)
)
Button({
Button(onClick = {
state.session?.job?.cancel()
state.session = state.startSearch(setOf(AbcUniSearchState.MethodName,AbcUniSearchState.ASM))
}){
}, enabled = state.filterText.isNotBlank()){
Text("查询")
}
}
Expand All @@ -141,15 +141,15 @@ fun AbcUniSearchStateView(
}
var tabIndex by remember { mutableStateOf(0) }
TabRow(
selectedTabIndex = 0
selectedTabIndex = tabIndex,
){
Tab(
selected = tabIndex == 0,
onClick = { tabIndex = 0 },
text = { Text("在方法名中查找") }
)
Tab(
selected = tabIndex == 0,
selected = tabIndex == 1,
onClick = { tabIndex = 1 },
text = { Text("在方法引用的字符串中查找") }
)
Expand All @@ -160,7 +160,7 @@ fun AbcUniSearchStateView(
1 -> AbcUniSearchState.ASM
else -> null
}]?.let { u ->
itemsIndexed(u){ index,it ->
itemsIndexed(u){ _,it ->
when(it){
is AbcUniSearchState.ClassResult -> {
Row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,11 @@ class AbcView(val abc: AbcBuf,override val hap:HapView? = null):AttachHapPage()
scope.launch(Dispatchers.Default) { realCkSum = realCheckSum.value }
})
}
}, if(appCfg.futureFeature) {
composeSelectContent {
}, composeSelectContent {
Image(Icons.search(), null, Modifier.fillMaxSize(), colorFilter = grayColorFilter)
} to composeContent {
AbcUniSearchStateView(hapSession, this, searchState)
}
} else null
))
}

Expand Down

0 comments on commit 37b28b4

Please sign in to comment.