About
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user