mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
feat(amsat): show consecutive same-status report count in status cells
Day-cell numbers now count the most recent consecutive reports sharing the newest status (counting back from the newest report, stopping at the first different status), instead of the total report count of the day. Empty gaps do not break the streak; statuses compare by exact report text; counting does not cross day boundaries. - SatDay gains streakCount (computed in AmSatRepository.buildStatuses) - DayCell renders day.streakCount instead of slot count sum - Add real org.json to core:data unit tests (android.jar stub cannot parse) - Add 2 streak tests: mixed-status slot breaks, all-same-status counts all
This commit is contained in:
1 parent
322becdda8
commit
9e88609efc
6 files changed
+95
-9
No files matched your search
@@ -20,7 +20,8 @@ data class SatSlot(
|
||||
/** One satellite day (12 two-hour slots) */
|
||||
data class SatDay(
|
||||
val dateLabel: String, // "Aug 4"
|
||||
val slots: List<SatSlot> // 12 槽(00-02 ... 22-24)
|
||||
val slots: List<SatSlot>, // 12 槽(00-02 ... 22-24)
|
||||
val streakCount: Int = 0 // 当天最近连续相同状态报告数(0 = 当天无报告)
|
||||
)
|
||||
|
||||
/** One satellite, 3 days of state */
|
||||
|
||||
Reference in new issue
Block a user