v1.19: fix empty usage-history chart (always fetch utilization)
Build APK / build (push) Successful in 1m52s
Build APK / build (push) Successful in 1m52s
recordHistory() only ever stored fiveHourUtilization/weeklyUtilization, but fetchUsage() returned early with message-count data — before calling the /usage utilization endpoint — whenever the org JSON carried a message limit. So utilization was never populated and the history chart stayed stuck on 'Collecting history…'. The prior chart fix only corrected the throttle. - UsageRepository: always attempt /usage (preferred signal that drives the weekly bar + history); fall back to org message-count data only when utilization is unavailable. - UsageData.sessionReadingPct: utilization preferred, message-count % fallback, -1f when no reading — so message-only accounts also build history. - PreferencesManager.recordHistory: record the session line from sessionReadingPct instead of utilization-only. - UsageDataTest: cover sessionReadingPct.
This commit is contained in:
@@ -24,8 +24,8 @@ android {
|
||||
applicationId = "me.khodak.claudeusage"
|
||||
minSdk = 26
|
||||
targetSdk = 34
|
||||
versionCode = 19
|
||||
versionName = "1.18"
|
||||
versionCode = 20
|
||||
versionName = "1.19"
|
||||
}
|
||||
|
||||
val releaseStorePassword = signingCred("KEYSTORE_PASSWORD", "storePassword")
|
||||
|
||||
Reference in New Issue
Block a user