Remove an unused color and statistics reset

This commit is contained in:
2026-10-31 11:32:10 +02:00
parent 509c0b9a86
commit ee430fa7c0
2 changed files with 1 additions and 14 deletions
@@ -46,7 +46,7 @@ object StatsStore {
private val counters = Array(HOURS) { LongArray(FIELDS) } private val counters = Array(HOURS) { LongArray(FIELDS) }
private var file: File? = null private var file: File? = null
// Bumped when the numbers change without a new query: loaded from disk or cleared // Bumped when the numbers change without a new query: loaded from disk
private val _version = MutableStateFlow(0) private val _version = MutableStateFlow(0)
val version: StateFlow<Int> = _version val version: StateFlow<Int> = _version
private var lastSave = 0L private var lastSave = 0L
@@ -121,18 +121,6 @@ object StatsStore {
} }
} }
fun clear() {
val snapshot = synchronized(this) {
hourIds.fill(-1L)
counters.forEach { it.fill(0L) }
dirty = false
lastSave = System.currentTimeMillis()
if (file != null) encode() else null
}
snapshot?.let(::save)
_version.value++
}
// Saves what is not on disk yet; called when the VPN stops // Saves what is not on disk yet; called when the VPN stops
fun flush() { fun flush() {
val snapshot = synchronized(this) { val snapshot = synchronized(this) {
@@ -48,7 +48,6 @@ object Palette {
val CardHigh = Color(0xFF1E2026) val CardHigh = Color(0xFF1E2026)
val Line = Color(0xFF24262C) val Line = Color(0xFF24262C)
val Track = Color(0xFF3A3C44) val Track = Color(0xFF3A3C44)
val Muted = Color(0xFF5B5F6B)
val Fg = Color(0xFFF2F3F5) val Fg = Color(0xFFF2F3F5)
val Fg2 = Color(0xFF9A9DA6) val Fg2 = Color(0xFF9A9DA6)
val Fg3 = Color(0xFF7E828C) val Fg3 = Color(0xFF7E828C)