Found 1 match for pattern "IconButton\(onClick = .* enabled =" in the workspace directory: --- File: app/src/main/java/com/servicebook/ui/reportbug/ReportBugScreen.kt L73- val context = LocalContext.current L74- val snackbarHostState = remember { SnackbarHostState() } L75- val scrollState = rememberScrollState() L76- L77- var showDeviceInfo by rememberSaveable { mutableStateOf(false) } L78- L79- val noEmailAppMessage = stringResource(R.string.report_bug_no_email_app) L80- L81- LaunchedEffect(Unit) { L82- viewModel.effects.collect { effect -> L83- when (effect) { L84- is ReportBugEffect.ShowSnackbar -> snackbarHostState.showSnackbar(effect.message) L85- ReportBugEffect.NavigateBack -> backStack.removeLastOrNull() L86- is ReportBugEffect.FallbackToEmail -> { L87- val intent = L88- Intent(Intent.ACTION_SENDTO).apply { L89- data = "mailto:".toUri() L90- putExtra(Intent.EXTRA_EMAIL, arrayOf(effect.recipient)) L91- putExtra(Intent.EXTRA_SUBJECT, effect.subject) L92- putExtra(Intent.EXTRA_TEXT, effect.body) L93- } L94- try { L95- context.startActivity(intent) L96- } catch (_: Exception) { L97- snackbarHostState.showSnackbar(noEmailAppMessage) L98- } L99- } L100- } L101- } L102- } L103- L104- if (showDeviceInfo) { L105- DeviceInfoDialog( L106- state = state, L107- onIncludeChanged = { viewModel.onEvent(ReportBugEvent.IncludeDeviceInfoChanged(it)) }, L108- onDismissRequest = { showDeviceInfo = false }, L109- ) L110- } L111- L112- Scaffold( L113- snackbarHost = { SnackbarHost(snackbarHostState) }, L114- topBar = { L115- TopAppBar( L116- title = { L117- Text( L118- text = stringResource(R.string.report_bug_title), L119- modifier = Modifier.testTag(TestTags.SCREEN_TITLE), L120- ) L121- }, L122- navigationIcon = { L123: IconButton(onClick = { backStack.removeLastOrNull() }, enabled = !state.isSubmitting) { L124- Icon( L125- Icons.AutoMirrored.Outlined.ArrowBack, L126- contentDescription = stringResource(R.string.action_back), L127- ) L128- } L129- }, L130- actions = { L131- if (state.isSubmitting) { L132- CircularProgressIndicator( L133- modifier = Modifier.size(24.dp).padding(end = 16.dp).testTag(TestTags.REPORT_BUG_LOADING), L134- strokeWidth = 2.dp, L135- ) L136- } else { L137- TextButton( L138- onClick = { viewModel.onEvent(ReportBugEvent.Submit) }, L139- enabled = state.canSubmit, L140- modifier = Modifier.testTag(TestTags.REPORT_BUG_SUBMIT_BUTTON), L141- ) { L142- Text(stringResource(R.string.report_bug_submit)) L143- } L144- } L145- }, L146- colors = appTopAppBarColors(), L147- ) L148- }, L149- ) { padding -> L150- Column( L151- modifier = L152- Modifier L153- .fillMaxSize() L154- .padding(padding) L155- .imePadding() L156- .verticalScroll(scrollState) L157- .padding(horizontal = 16.dp, vertical = 12.dp), L158- verticalArrangement = Arrangement.spacedBy(12.dp), L159- ) { L160- if (state.isSubmitting) { L161- LinearProgressIndicator( L162- modifier = Modifier.fillMaxWidth(), L163- ) L164- } L165- L166- // Type L167- Text( L168- text = stringResource(R.string.report_bug_type_section), L169- style = MaterialTheme.typography.titleSmall, L170- color = MaterialTheme.colorScheme.primary, L171- ) L172- L173- SingleChoiceSegmentedButtonRow(modifier = Modifier.fillMaxWidth()) { ---