Load event app lists asynchronously
This commit is contained in:
@@ -6,9 +6,9 @@ import org.junit.Test
|
||||
class AppListOrderingTest {
|
||||
private fun app(label: String, seen: Boolean = false, selected: Boolean = false) = ListedApp(label, "pkg.$label", seen, selected)
|
||||
|
||||
@Test fun `seen apps are first with a separator when requested`() {
|
||||
@Test fun `seen apps are repeated before the full list when requested`() {
|
||||
val items = AppListOrdering.items(listOf(app("Zulu"), app("Beta", seen = true), app("Alpha", seen = true)), false, true)
|
||||
assertEquals(listOf("Alpha", "Beta", "|", "Zulu"), items.map { if (it is AppListItem.App) it.value.label else "|" })
|
||||
assertEquals(listOf("Alpha", "Beta", "|", "Alpha", "Beta", "Zulu"), items.map { if (it is AppListItem.App) it.value.label else "|" })
|
||||
}
|
||||
|
||||
@Test fun `selected unseen app remains after seen apps in only-seen mode`() {
|
||||
|
||||
Reference in New Issue
Block a user