car toasts: match the message popup and stay up longer

A driver only glances at the screen, so short toasts now last 4 seconds and long
ones 7. The card uses the popup's colours, which read better over a map.
This commit is contained in:
Seb3thehacker committed 2026-10-09 14:24:32 -07:00
1 parent 006823232d
commit 179a51ea25
3 files changed
+10 -8

No files matched your search

@@ -71,10 +71,10 @@ class CarToastsTest {
fun unknownDurationsFallBackToShortRatherThanStayingVisible() {
val owner = Any()
CarToasts.show(owner, "Short", CarToast.LENGTH_SHORT)
assertEquals(2_000L, CarToasts.message.value?.durationMs)
assertEquals(4_000L, CarToasts.message.value?.durationMs)
CarToasts.show(owner, "Long", CarToast.LENGTH_LONG)
assertEquals(3_500L, CarToasts.message.value?.durationMs)
assertEquals(7_000L, CarToasts.message.value?.durationMs)
CarToasts.show(owner, "Unknown", Int.MAX_VALUE)
assertEquals(2_000L, CarToasts.message.value?.durationMs)
assertEquals(4_000L, CarToasts.message.value?.durationMs)
}
}