mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 06:05:21 +00:00
10 is default
This commit is contained in:
@@ -17,7 +17,7 @@ object PoWPreferenceManager {
|
|||||||
|
|
||||||
// Default values
|
// Default values
|
||||||
private const val DEFAULT_POW_ENABLED = false
|
private const val DEFAULT_POW_ENABLED = false
|
||||||
private const val DEFAULT_POW_DIFFICULTY = 16 // Reasonable default for geohash spam prevention
|
private const val DEFAULT_POW_DIFFICULTY = 10 // Reasonable default for geohash spam prevention
|
||||||
|
|
||||||
// State flows for reactive UI
|
// State flows for reactive UI
|
||||||
private val _powEnabled = MutableStateFlow(DEFAULT_POW_ENABLED)
|
private val _powEnabled = MutableStateFlow(DEFAULT_POW_ENABLED)
|
||||||
|
|||||||
@@ -218,15 +218,7 @@ fun AboutSheet(
|
|||||||
Surface(
|
Surface(
|
||||||
color = if (isDark) Color(0xFF32D74B) else Color(0xFF248A3D),
|
color = if (isDark) Color(0xFF32D74B) else Color(0xFF248A3D),
|
||||||
shape = RoundedCornerShape(50)
|
shape = RoundedCornerShape(50)
|
||||||
) {
|
) { Box(Modifier.size(8.dp)) }
|
||||||
Text(
|
|
||||||
text = "$powDifficulty",
|
|
||||||
fontSize = 9.sp,
|
|
||||||
fontFamily = FontFamily.Monospace,
|
|
||||||
color = Color.White,
|
|
||||||
modifier = Modifier.padding(horizontal = 6.dp, vertical = 2.dp)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -256,8 +248,8 @@ fun AboutSheet(
|
|||||||
Slider(
|
Slider(
|
||||||
value = powDifficulty.toFloat(),
|
value = powDifficulty.toFloat(),
|
||||||
onValueChange = { PoWPreferenceManager.setPowDifficulty(it.toInt()) },
|
onValueChange = { PoWPreferenceManager.setPowDifficulty(it.toInt()) },
|
||||||
valueRange = 0f..32f,
|
valueRange = 0f..20f,
|
||||||
steps = 31, // 32 discrete values (0-32)
|
steps = 21, // 20 discrete values (0-20)
|
||||||
colors = SliderDefaults.colors(
|
colors = SliderDefaults.colors(
|
||||||
thumbColor = if (isDark) Color(0xFF32D74B) else Color(0xFF248A3D),
|
thumbColor = if (isDark) Color(0xFF32D74B) else Color(0xFF248A3D),
|
||||||
activeTrackColor = if (isDark) Color(0xFF32D74B) else Color(0xFF248A3D)
|
activeTrackColor = if (isDark) Color(0xFF32D74B) else Color(0xFF248A3D)
|
||||||
|
|||||||
Reference in New Issue
Block a user