Redesign discover screen

removes category groups and uses featured categories instead
This commit is contained in:
Torsten Grote
2026-04-21 15:15:41 -03:00
parent f1efe874d9
commit ce6f2380cc
63 changed files with 162 additions and 657 deletions

View File

@@ -1,5 +1,6 @@
package org.fdroid.ui.screenshots
import java.text.Collator
import org.fdroid.ui.discover.Discover
import org.fdroid.ui.discover.LoadedDiscoverModel
import org.junit.Test
@@ -16,12 +17,16 @@ class DiscoverScreenshotTest(localeName: String) : LocalizedScreenshotTest(local
@Test
fun appDetails() =
screenshotTest("1_Discover") { localeList ->
val collator = Collator.getInstance(localeList.get(0))
val model =
LoadedDiscoverModel(
newApps = getNewApps(localeList),
recentlyUpdatedApps = getRecentlyUpdatedApps(localeList),
mostDownloadedApps = getMostDownloadedApps(localeList),
categories = getCategoryItems(localeList).groupBy { it.group },
categories =
getCategoryItems(localeList).filter { it.featured }.sortedWith { c1, c2 ->
collator.compare(c1.name, c2.name)
},
hasRepoIssues = false,
)
Discover(discoverModel = model, onListTap = {}, onAppTap = {}, onNav = {})