mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-10 16:02:25 +01:00
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:
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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user