fix: 清空日志时同步重置首页计数器
clearLogs() 同时归零 sent/filtered/failed 三个累计计数器 版本 1.4.1 → 1.4.2 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,8 +13,8 @@ android {
|
||||
applicationId = "com.a2i.forwarder"
|
||||
minSdk = 34
|
||||
targetSdk = 36
|
||||
versionCode = 6
|
||||
versionName = "1.4.1"
|
||||
versionCode = 7
|
||||
versionName = "1.4.2"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
|
||||
@@ -78,8 +78,14 @@ class LogStore(private val context: Context, scope: CoroutineScope) {
|
||||
}
|
||||
|
||||
suspend fun clearLogs() {
|
||||
ds.edit { it.remove(K.LOGS) }
|
||||
ds.edit {
|
||||
it.remove(K.LOGS)
|
||||
it[K.SENT] = 0
|
||||
it[K.FILTERED] = 0
|
||||
it[K.FAILED] = 0
|
||||
}
|
||||
logs.value = emptyList()
|
||||
sentCount.value = 0; filteredCount.value = 0; failedCount.value = 0
|
||||
}
|
||||
|
||||
suspend fun resetCounters() {
|
||||
|
||||
Reference in New Issue
Block a user