Fix explorer back and session usage selection
This commit is contained in:
1 parent
8c88a7e991
commit
14dd520719
10 files changed
+222
-57
No files matched your search
@@ -884,6 +884,8 @@ data class UsageWindow(
|
||||
val kind: String,
|
||||
val label: String,
|
||||
val percent: Double,
|
||||
/** Length of this cycle, when the provider reported it. */
|
||||
val durationMinutes: Long?,
|
||||
val resetsAt: String?,
|
||||
val active: Boolean,
|
||||
)
|
||||
@@ -931,6 +933,10 @@ fun fetchUsage(settings: ServerSettings): List<UsageSnapshot> =
|
||||
kind = window.optString("kind").ifEmpty { "unknown" },
|
||||
label = window.getString("label"),
|
||||
percent = window.getDouble("percent"),
|
||||
durationMinutes =
|
||||
if (window.has("durationMinutes")) {
|
||||
window.getLong("durationMinutes")
|
||||
} else null,
|
||||
resetsAt = window.optString("resetsAt").ifEmpty { null },
|
||||
active = window.getBoolean("active"),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user