refactor: prepare for baseline profile generation test
This commit is contained in:
@@ -219,9 +219,12 @@ fun AppScreen(
|
||||
Crossfade(selected) {
|
||||
if (it) Icon(
|
||||
painterResource(item.selectedIcon),
|
||||
null
|
||||
stringResource(item.label)
|
||||
)
|
||||
else Icon(
|
||||
painterResource(item.unselectedIcon),
|
||||
stringResource(item.label)
|
||||
)
|
||||
else Icon(painterResource(item.unselectedIcon), null)
|
||||
}
|
||||
AnimatedVisibility(
|
||||
visible = selected || wide,
|
||||
|
||||
@@ -173,12 +173,11 @@ private fun SettingsScreen(
|
||||
setShowSheet = { showLocaleSheet = it }
|
||||
)
|
||||
|
||||
if(settingsState.isShowingEraseDataDialog){
|
||||
ResetDataDialog(resetData = {
|
||||
onAction(SettingsAction.EraseData)
|
||||
}, onDismiss = {
|
||||
onAction(SettingsAction.CancelEraseData)
|
||||
})
|
||||
if (settingsState.isShowingEraseDataDialog) {
|
||||
ResetDataDialog(
|
||||
resetData = { onAction(SettingsAction.EraseData) },
|
||||
onDismiss = { onAction(SettingsAction.CancelEraseData) }
|
||||
)
|
||||
}
|
||||
|
||||
NavDisplay(
|
||||
@@ -310,11 +309,11 @@ private fun SettingsScreen(
|
||||
Box(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
contentAlignment = Alignment.Center
|
||||
){
|
||||
) {
|
||||
|
||||
TextButton(
|
||||
onClick = { onAction(SettingsAction.AskEraseData) },
|
||||
) {
|
||||
) {
|
||||
Text(stringResource(R.string.reset_data))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ fun AboutScreen(
|
||||
) {
|
||||
Icon(
|
||||
painterResource(R.drawable.arrow_back),
|
||||
null
|
||||
stringResource(R.string.back)
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -183,7 +183,7 @@ fun AlarmSettings(
|
||||
) {
|
||||
Icon(
|
||||
painterResource(R.drawable.arrow_back),
|
||||
null
|
||||
stringResource(R.string.back)
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -92,7 +92,7 @@ fun AppearanceSettings(
|
||||
) {
|
||||
Icon(
|
||||
painterResource(R.drawable.arrow_back),
|
||||
null
|
||||
stringResource(R.string.back)
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -206,7 +206,8 @@ fun TimerSettings(
|
||||
) {
|
||||
Icon(
|
||||
painterResource(R.drawable.arrow_back),
|
||||
null
|
||||
stringResource(R.string.back)
|
||||
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -146,7 +146,7 @@ fun SharedTransitionScope.LastMonthScreen(
|
||||
) {
|
||||
Icon(
|
||||
painterResource(R.drawable.arrow_back),
|
||||
null
|
||||
stringResource(R.string.back)
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -145,7 +145,7 @@ fun SharedTransitionScope.LastWeekScreen(
|
||||
) {
|
||||
Icon(
|
||||
painterResource(R.drawable.arrow_back),
|
||||
null
|
||||
stringResource(R.string.back)
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -153,7 +153,7 @@ fun SharedTransitionScope.LastYearScreen(
|
||||
) {
|
||||
Icon(
|
||||
painterResource(R.drawable.arrow_back),
|
||||
null
|
||||
stringResource(R.string.back)
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -122,4 +122,5 @@
|
||||
<string name="focus_history_calendar_desc">Focus history of the past month. Days of the previous month are marked with a different color. Tap on a date for more info.</string>
|
||||
<string name="reset_data">Reset stats</string>
|
||||
<string name="reset_data_dialog_text">Are you sure you want to reset all your stats?</string>
|
||||
<string name="back">Back</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user