Skip to content

Commit

Permalink
Merge pull request #106 from azrael8576/refactor/enum-entries
Browse files Browse the repository at this point in the history
refactor: Replace `Enum.values()` with `Enum.entries`
  • Loading branch information
azrael8576 authored Jan 29, 2024
2 parents 59659ae + e8c33e9 commit d37f15f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit d37f15f

Please sign in to comment.