Skip to content

Commit

Permalink
refactor: ui
Browse files Browse the repository at this point in the history
  • Loading branch information
jing332 committed Jun 29, 2023
1 parent 2ed03d8 commit 73de12f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,8 @@ fun ReplaceRuleManagerScreen(
}
}

var isMoreOptionsVisible by remember {
mutableStateOf(false)
}
IconButton(onClick = {
isMoreOptionsVisible = true
}) {
var isMoreOptionsVisible by remember { mutableStateOf(false) }
IconButton(onClick = { isMoreOptionsVisible = true }) {
Icon(
Icons.Filled.MoreVert,
stringResource(id = R.string.more_options)
Expand Down Expand Up @@ -343,8 +339,6 @@ private fun Screen(
onReorder: (fromIndex: Int, toIndex: Int) -> Unit,
onExportGroup: (ReplaceRuleGroup, Boolean) -> Unit,
) {
// 保存展开的分组ID 提高效率 避免每次item都要去list中查找
// var expandedGroups by remember { mutableStateOf<List<Long>>(emptyList()) }
val orderState = rememberReorderableLazyListState(onMove = { from, to ->
println("from $from to $to")
onReorder.invoke(from.index, to.index)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.onFocusChanged
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.text
Expand Down Expand Up @@ -241,7 +242,6 @@ private fun Screen(

var sampleTextFieldValue by remember { mutableStateOf(TextFieldValue("")) }
if (insertKeyState.value.isNotEmpty()) {
println("insertKeyState.value: " + insertKeyState.value)
when (currentInputFocus) {
InputFieldID.NAME ->
setName(nameTextFieldValue.newValueOfInsertText(insertKeyState.value))
Expand Down

0 comments on commit 73de12f

Please sign in to comment.