Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Replace Enum.values() with Enum.entries #106

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/java/com/wei/amazingtalker/ui/AtAppState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class AtAppState(
* Map of top level destinations to be used in the TopBar, BottomBar and NavRail. The key is the
* route.
*/
val topLevelDestinations: List<TopLevelDestination> = TopLevelDestination.values().asList()
val topLevelDestinations: List<TopLevelDestination> = TopLevelDestination.entries

/**
* UI logic for navigating to a top level destination in the app. Top level destinations have
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class IntervalizeScheduleUseCaseTest(
@JvmStatic
@Parameterized.Parameters(name = "{0}")
fun data(): Collection<Array<TimeInterval>> {
return TimeInterval.values().map { arrayOf(it) }
return TimeInterval.entries.map { arrayOf(it) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fun <A : ComponentActivity> AndroidComposeTestRule<ActivityScenarioRule<A>, A>.c
screenshotName: String,
body: @Composable () -> Unit,
) {
DefaultTestDevices.values().forEach {
DefaultTestDevices.entries.forEach {
this.captureForDevice(it.description, it.spec, screenshotName, body = body)
}
}
Expand Down
Loading