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 for refreshing Advanced Options Name field everytime a new TraceC… #636

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,10 @@ public class TraceState(
private var _isTaskInProgress: MutableState<Boolean> = mutableStateOf(false)
internal val isTaskInProgress: State<Boolean> = _isTaskInProgress

private var _currentTraceName: MutableState<String> = mutableStateOf("")

private var _currentScreen: MutableState<TraceNavRoute> = mutableStateOf(TraceNavRoute.TraceOptions)
private val currentScreen: State<TraceNavRoute> = _currentScreen

private var _currentTraceName: MutableState<String> = mutableStateOf("")
/**
* The default name of the trace.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ internal fun AdvancedOptions(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween
) {
var text by rememberSaveable { mutableStateOf(defaultTraceName) }
var text by remember(defaultTraceName) { mutableStateOf(defaultTraceName) }
OutlinedTextField(
value = text,
onValueChange = { newValue ->
Expand Down