This commit is contained in:
sathwikcs
2024-10-19 11:46:42 +05:30
parent dfea713a26
commit 7c23d1b493

View File

@@ -29,19 +29,18 @@ import kotlinx.coroutines.launch
@SuppressLint("CoroutineCreationDuringComposition")
@Composable
fun AboutSettings(context: Context)
{
fun AboutSettings(context: Context) {
val scope = rememberCoroutineScope()
val dataStore = SettingsData(context)
var clickCount by remember { mutableIntStateOf(0) }
if (clickCount > 5) {
scope.launch {
dataStore.setDevMode(true)
}
}
clickCount = 0
Toast.makeText(context, "Developer mode is On : Scroll Down", Toast.LENGTH_SHORT).show()
Toast.makeText(context, "Developer mode is On : Scroll Down", Toast.LENGTH_SHORT).show()
}
Column(modifier = Modifier.padding(10.dp,0.dp,10.dp,10.dp)) {
Column(modifier = Modifier.padding(10.dp, 0.dp, 10.dp, 10.dp)) {
Text(
text = "About",
style = MaterialTheme.typography.labelLarge,
@@ -51,21 +50,23 @@ fun AboutSettings(context: Context)
.padding(14.dp),
color = MaterialTheme.colorScheme.primary
)
OutlinedCard{
OutlinedCard {
ClickableCard(
title = "Version",
subtitle = "1.0.04",
subtitle = context.packageManager.getPackageInfo(
context.packageName,
0
).versionName,
onClick = {
clickCount++
},
icon = ImageVector.vectorResource(id = R.drawable.round_info_24)
icon = ImageVector.vectorResource(id = R.drawable.round_info_24)
)
CombinedClickableCard(
title = "Developer",
CombinedClickableCard(title = "Developer",
subtitle = "SM Innovations Pvt Ltd",
onClick = {
}, onDoubleClick={
onClick = {},
onDoubleClick = {
},
icon = ImageVector.vectorResource(id = R.drawable.round_logo_dev_24)