mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
Bump
This commit is contained in:
parent
cd2b27c094
commit
ede1ffe2cd
@ -33,9 +33,9 @@ import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.ListItem
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.OutlinedTextField
|
||||
import androidx.compose.material3.OutlinedTextFieldDefaults
|
||||
import androidx.compose.material3.Switch
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextFieldDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
@ -52,7 +52,7 @@ import com.sadellie.unitto.core.ui.R
|
||||
* Represents one item in list on Settings screen.
|
||||
*
|
||||
* @param label Main text.
|
||||
* @param supportText Text that is located below label.
|
||||
* @param supportContent Text that is located below label.
|
||||
* @param switchState Current switch state.
|
||||
* @param onSwitchChange Action to perform when user clicks on this component or just switch. Gives
|
||||
* you new value.
|
||||
@ -61,7 +61,7 @@ import com.sadellie.unitto.core.ui.R
|
||||
fun UnittoListItem(
|
||||
label: String,
|
||||
leadingContent: @Composable (() -> Unit)?,
|
||||
supportText: String? = null,
|
||||
supportContent: String? = null,
|
||||
switchState: Boolean,
|
||||
onSwitchChange: (Boolean) -> Unit
|
||||
) {
|
||||
@ -72,8 +72,8 @@ fun UnittoListItem(
|
||||
indication = rememberRipple(),
|
||||
onClick = { onSwitchChange(!switchState) }
|
||||
),
|
||||
headlineText = { Text(label) },
|
||||
supportingText = { supportText?.let { Text(text = it) } },
|
||||
headlineContent = { Text(label) },
|
||||
supportingContent = { supportContent?.let { Text(text = it) } },
|
||||
leadingContent = leadingContent,
|
||||
trailingContent = {
|
||||
Switch(
|
||||
@ -111,8 +111,8 @@ fun <T> UnittoListItem(
|
||||
)
|
||||
|
||||
ListItem(
|
||||
headlineText = { Text(label) },
|
||||
supportingText = { supportText?.let { Text(text = it) } },
|
||||
headlineContent = { Text(label) },
|
||||
supportingContent = { supportText?.let { Text(text = it) } },
|
||||
leadingContent = leadingContent,
|
||||
trailingContent = {
|
||||
ExposedDropdownMenuBox(
|
||||
@ -130,10 +130,10 @@ fun <T> UnittoListItem(
|
||||
singleLine = true,
|
||||
enabled = false,
|
||||
textStyle = MaterialTheme.typography.bodyLarge,
|
||||
colors = TextFieldDefaults.outlinedTextFieldColors(
|
||||
disabledBorderColor = MaterialTheme.colorScheme.outline,
|
||||
colors = OutlinedTextFieldDefaults.colors(
|
||||
disabledTextColor = MaterialTheme.colorScheme.onSurface,
|
||||
disabledTrailingIconColor = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
disabledBorderColor = MaterialTheme.colorScheme.outline,
|
||||
disabledTrailingIconColor = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
),
|
||||
trailingIcon = {
|
||||
Icon(
|
||||
|
@ -75,7 +75,7 @@ internal fun AboutScreen(
|
||||
stringResource(R.string.currency_rates_note_setting)
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.currency_rates_note_setting)) },
|
||||
headlineContent = { Text(stringResource(R.string.currency_rates_note_setting)) },
|
||||
modifier = Modifier.clickable { showDialog = true }
|
||||
)
|
||||
}
|
||||
@ -89,7 +89,7 @@ internal fun AboutScreen(
|
||||
stringResource(R.string.terms_and_conditions)
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.terms_and_conditions)) },
|
||||
headlineContent = { Text(stringResource(R.string.terms_and_conditions)) },
|
||||
modifier = Modifier.clickable {
|
||||
openLink(
|
||||
mContext,
|
||||
@ -108,7 +108,7 @@ internal fun AboutScreen(
|
||||
stringResource(R.string.privacy_policy)
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.privacy_policy)) },
|
||||
headlineContent = { Text(stringResource(R.string.privacy_policy)) },
|
||||
modifier = Modifier.clickable {
|
||||
openLink(
|
||||
mContext,
|
||||
@ -127,7 +127,7 @@ internal fun AboutScreen(
|
||||
stringResource(R.string.open_source)
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.open_source)) },
|
||||
headlineContent = { Text(stringResource(R.string.open_source)) },
|
||||
modifier = Modifier.clickable {
|
||||
openLink(
|
||||
mContext,
|
||||
@ -146,8 +146,8 @@ internal fun AboutScreen(
|
||||
stringResource(R.string.translate_app)
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.translate_app)) },
|
||||
supportingText = { Text(stringResource(R.string.translate_app_support)) },
|
||||
headlineContent = { Text(stringResource(R.string.translate_app)) },
|
||||
supportingContent = { Text(stringResource(R.string.translate_app_support)) },
|
||||
modifier = Modifier.clickable {
|
||||
openLink(
|
||||
mContext,
|
||||
@ -166,7 +166,7 @@ internal fun AboutScreen(
|
||||
stringResource(R.string.third_party_licenses)
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.third_party_licenses)) },
|
||||
headlineContent = { Text(stringResource(R.string.third_party_licenses)) },
|
||||
modifier = Modifier.clickable { navigateToThirdParty() }
|
||||
)
|
||||
}
|
||||
@ -180,8 +180,8 @@ internal fun AboutScreen(
|
||||
stringResource(R.string.app_version_name_setting)
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.app_version_name_setting)) },
|
||||
supportingText = { Text("${BuildConfig.APP_NAME} (${BuildConfig.APP_CODE})") },
|
||||
headlineContent = { Text(stringResource(R.string.app_version_name_setting)) },
|
||||
supportingContent = { Text("${BuildConfig.APP_NAME} (${BuildConfig.APP_CODE})") },
|
||||
modifier = Modifier.combinedClickable {
|
||||
if (userPrefs.value.enableToolsExperiment) {
|
||||
Toast.makeText(mContext, "Tools already enabled!", Toast.LENGTH_LONG).show()
|
||||
|
@ -88,8 +88,8 @@ internal fun SettingsScreen(
|
||||
stringResource(R.string.theme_setting),
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.theme_setting)) },
|
||||
supportingText = { Text(stringResource(R.string.theme_setting_support)) },
|
||||
headlineContent = { Text(stringResource(R.string.theme_setting)) },
|
||||
supportingContent = { Text(stringResource(R.string.theme_setting_support)) },
|
||||
modifier = Modifier.clickable { navControllerAction(themesRoute) }
|
||||
)
|
||||
}
|
||||
@ -103,8 +103,8 @@ internal fun SettingsScreen(
|
||||
stringResource(R.string.starting_screen_setting),
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.starting_screen_setting)) },
|
||||
supportingText = { Text(stringResource(R.string.starting_screen_setting_support)) },
|
||||
headlineContent = { Text(stringResource(R.string.starting_screen_setting)) },
|
||||
supportingContent = { Text(stringResource(R.string.starting_screen_setting_support)) },
|
||||
modifier = Modifier.clickable { dialogState = DialogState.START_SCREEN }
|
||||
)
|
||||
}
|
||||
@ -121,8 +121,8 @@ internal fun SettingsScreen(
|
||||
stringResource(R.string.precision_setting),
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.precision_setting)) },
|
||||
supportingText = { Text(stringResource(R.string.precision_setting_support)) },
|
||||
headlineContent = { Text(stringResource(R.string.precision_setting)) },
|
||||
supportingContent = { Text(stringResource(R.string.precision_setting_support)) },
|
||||
modifier = Modifier.clickable { dialogState = DialogState.PRECISION }
|
||||
)
|
||||
}
|
||||
@ -130,8 +130,8 @@ internal fun SettingsScreen(
|
||||
// SEPARATOR
|
||||
item {
|
||||
ListItem(
|
||||
headlineText = { Text(stringResource(R.string.separator_setting)) },
|
||||
supportingText = { Text(stringResource(R.string.separator_setting_support)) },
|
||||
headlineContent = { Text(stringResource(R.string.separator_setting)) },
|
||||
supportingContent = { Text(stringResource(R.string.separator_setting_support)) },
|
||||
modifier = Modifier
|
||||
.clickable { dialogState = DialogState.SEPARATOR }
|
||||
.padding(start = 40.dp)
|
||||
@ -141,8 +141,8 @@ internal fun SettingsScreen(
|
||||
// OUTPUT FORMAT
|
||||
item {
|
||||
ListItem(
|
||||
headlineText = { Text(stringResource(R.string.output_format_setting)) },
|
||||
supportingText = { Text(stringResource(R.string.output_format_setting_support)) },
|
||||
headlineContent = { Text(stringResource(R.string.output_format_setting)) },
|
||||
supportingContent = { Text(stringResource(R.string.output_format_setting_support)) },
|
||||
modifier = Modifier
|
||||
.clickable { dialogState = DialogState.OUTPUT_FORMAT }
|
||||
.padding(start = 40.dp)
|
||||
@ -161,8 +161,8 @@ internal fun SettingsScreen(
|
||||
stringResource(R.string.disable_unit_group_description),
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.unit_groups_setting)) },
|
||||
supportingText = { Text(stringResource(R.string.unit_groups_support)) },
|
||||
headlineContent = { Text(stringResource(R.string.unit_groups_setting)) },
|
||||
supportingContent = { Text(stringResource(R.string.unit_groups_support)) },
|
||||
modifier = Modifier.clickable { navControllerAction(unitsGroupRoute) }
|
||||
)
|
||||
}
|
||||
@ -176,8 +176,8 @@ internal fun SettingsScreen(
|
||||
stringResource(R.string.units_sorting)
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.units_sorting)) },
|
||||
supportingText = { Text(stringResource(R.string.units_sorting_support)) },
|
||||
headlineContent = { Text(stringResource(R.string.units_sorting)) },
|
||||
supportingContent = { Text(stringResource(R.string.units_sorting_support)) },
|
||||
modifier = Modifier.clickable { dialogState = DialogState.UNIT_LIST_SORTING }
|
||||
)
|
||||
}
|
||||
@ -192,7 +192,7 @@ internal fun SettingsScreen(
|
||||
stringResource(R.string.format_time)
|
||||
)
|
||||
},
|
||||
supportText = stringResource(R.string.format_time_support),
|
||||
supportContent = stringResource(R.string.format_time_support),
|
||||
switchState = userPrefs.value.unitConverterFormatTime,
|
||||
onSwitchChange = viewModel::updateUnitConverterFormatTime
|
||||
)
|
||||
@ -211,7 +211,7 @@ internal fun SettingsScreen(
|
||||
stringResource(R.string.enable_vibrations)
|
||||
)
|
||||
},
|
||||
supportText = stringResource(R.string.enable_vibrations_support),
|
||||
supportContent = stringResource(R.string.enable_vibrations_support),
|
||||
switchState = userPrefs.value.enableVibrations,
|
||||
onSwitchChange = viewModel::updateVibrations
|
||||
)
|
||||
@ -227,7 +227,7 @@ internal fun SettingsScreen(
|
||||
stringResource(R.string.rate_this_app),
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.rate_this_app)) },
|
||||
headlineContent = { Text(stringResource(R.string.rate_this_app)) },
|
||||
modifier = Modifier.clickable { openLink(mContext, BuildConfig.STORE_LINK) }
|
||||
)
|
||||
}
|
||||
@ -242,8 +242,8 @@ internal fun SettingsScreen(
|
||||
stringResource(R.string.about_unitto),
|
||||
)
|
||||
},
|
||||
headlineText = { Text(stringResource(R.string.about_unitto)) },
|
||||
supportingText = { Text(stringResource(R.string.about_unitto_support)) },
|
||||
headlineContent = { Text(stringResource(R.string.about_unitto)) },
|
||||
supportingContent = { Text(stringResource(R.string.about_unitto_support)) },
|
||||
modifier = Modifier.clickable { navControllerAction(aboutRoute) }
|
||||
)
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ internal fun ThemesScreen(
|
||||
)
|
||||
},
|
||||
label = stringResource(R.string.enable_dynamic_colors),
|
||||
supportText = stringResource(R.string.enable_dynamic_colors_support),
|
||||
supportContent = stringResource(R.string.enable_dynamic_colors_support),
|
||||
switchState = themmoController.isDynamicThemeEnabled,
|
||||
onSwitchChange = {
|
||||
themmoController.enableDynamicTheme(it)
|
||||
@ -106,7 +106,7 @@ internal fun ThemesScreen(
|
||||
)
|
||||
},
|
||||
label = stringResource(R.string.force_amoled_mode),
|
||||
supportText = stringResource(R.string.force_amoled_mode_support),
|
||||
supportContent = stringResource(R.string.force_amoled_mode_support),
|
||||
switchState = themmoController.isAmoledThemeEnabled,
|
||||
onSwitchChange = {
|
||||
themmoController.enableAmoledTheme(it)
|
||||
|
@ -100,7 +100,7 @@ internal fun UnitGroupsScreen(
|
||||
}
|
||||
|
||||
ListItem(
|
||||
headlineText = { Text(stringResource(item.res)) },
|
||||
headlineContent = { Text(stringResource(item.res)) },
|
||||
modifier = Modifier
|
||||
.padding(horizontal = itemPadding)
|
||||
.clip(CircleShape)
|
||||
@ -153,7 +153,7 @@ internal fun UnitGroupsScreen(
|
||||
.background(MaterialTheme.colorScheme.surface)
|
||||
.clickable { viewModel.returnUnitGroup(it) }
|
||||
.animateItemPlacement(),
|
||||
headlineText = { Text(stringResource(it.res)) },
|
||||
headlineContent = { Text(stringResource(it.res)) },
|
||||
trailingContent = {
|
||||
Icon(
|
||||
Icons.Default.AddCircleOutline,
|
||||
|
@ -2,31 +2,31 @@
|
||||
appCode = "19"
|
||||
appName = "Jazzberry jam"
|
||||
kotlin = "1.8.10"
|
||||
androidxCore = "1.9.0"
|
||||
androidGradlePlugin = "7.4.1"
|
||||
androidxCore = "1.10.0"
|
||||
androidGradlePlugin = "7.4.2"
|
||||
orgJetbrainsKotlinxCoroutinesTest = "1.6.4"
|
||||
androidxCompose = "1.4.0-beta01"
|
||||
androidxComposeCompiler = "1.4.2"
|
||||
androidxComposeUi = "1.4.0-beta01"
|
||||
androidxComposeMaterial3 = "1.1.0-alpha06"
|
||||
androidxCompose = "1.5.0-alpha02"
|
||||
androidxComposeCompiler = "1.4.4"
|
||||
androidxComposeUi = "1.5.0-alpha02"
|
||||
androidxComposeMaterial3 = "1.1.0-beta02"
|
||||
androidxNavigation = "2.5.3"
|
||||
androidxLifecycleRuntimeCompose = "2.6.0-beta01"
|
||||
androidxLifecycleRuntimeCompose = "2.6.1"
|
||||
androidxHilt = "1.0.0"
|
||||
comGoogleDagger = "2.44.2"
|
||||
androidxComposeMaterialIconsExtended = "1.4.0-alpha04"
|
||||
comGoogleDagger = "2.45"
|
||||
androidxComposeMaterialIconsExtended = "1.5.0-alpha02"
|
||||
androidxDatastore = "1.0.0"
|
||||
comGoogleAccompanist = "0.27.1"
|
||||
androidxRoom = "2.4.3"
|
||||
comGoogleAccompanist = "0.30.1"
|
||||
androidxRoom = "2.5.1"
|
||||
comSquareupMoshi = "1.14.0"
|
||||
comSquareupRetrofit2 = "2.9.0"
|
||||
comGithubSadellieThemmo = "cf6be7e592"
|
||||
comGithubSadellieThemmo = "3e34a0dcfe"
|
||||
orgBurnoutcrewComposereorderable = "0.9.6"
|
||||
comGithubSadellieExprk = "e55cba8f41"
|
||||
mxParser = "5.2.1"
|
||||
junit = "4.13.2"
|
||||
androidxTest = "1.5.0"
|
||||
androidxTestExt = "1.1.4"
|
||||
androidDesugarJdkLibs = "2.0.2"
|
||||
androidDesugarJdkLibs = "2.0.3"
|
||||
androidxTestRunner = "1.5.1"
|
||||
androidxTestRules = "1.5.0"
|
||||
orgRobolectric = "4.9"
|
||||
|
Loading…
x
Reference in New Issue
Block a user