Qt: cache home screen state (#20395)

* cache drive stats

* don't parse response if it's the same as previous

* remove blank line

* cleanup

* update stats in place

* validate json

* add DriveStats to params.pyx

* cleanup

* cleanup

* remove //#include

* simplify

* add cache to RequestRepeater

* rename CachedDriveStats to ApiCacheDriveStats

* rename ApiCacheDriveStats to ApiCache_DriveStats

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 80ae6a7e1b1d1ec231c4719b677fd08b22818ce1
This commit is contained in:
Dean Lee
2021-03-26 20:29:30 +08:00
committed by GitHub
parent 99ee7bf600
commit ae8893a77f
5 changed files with 52 additions and 74 deletions
+1
View File
@@ -15,6 +15,7 @@ cdef enum TxType:
keys = {
b"AccessToken": [TxType.CLEAR_ON_MANAGER_START],
b"ApiCache_DriveStats": [TxType.PERSISTENT],
b"AthenadPid": [TxType.PERSISTENT],
b"CalibrationParams": [TxType.PERSISTENT],
b"CarBatteryCapacity": [TxType.PERSISTENT],