Skip to content

Commit

Permalink
Remove unneeded function SideMissionStatus.maxOf
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanLongstaff committed Jan 7, 2025
1 parent 8286223 commit 0b3e438
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class MissionsFragment : Fragment(R.layout.missions_fragment) {
root.setBackgroundColor(
ContextCompat.getColor(
root.context,
SideMissionStatus.maxOf(
maxOf(
nextTo.missionStatus,
thenTo?.missionStatus ?: SideMissionStatus.ALL_CLEAR,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,5 @@ import artemis.agent.R
enum class SideMissionStatus(@ColorRes val backgroundColor: Int) {
ALL_CLEAR(R.color.allyStatusBackgroundBlue),
OVERTAKEN(R.color.allyStatusBackgroundOrange),
DAMAGED(R.color.allyStatusBackgroundYellow);

companion object {
fun maxOf(a: SideMissionStatus, b: SideMissionStatus): SideMissionStatus =
if (a.ordinal > b.ordinal) a else b
}
DAMAGED(R.color.allyStatusBackgroundYellow),
}

0 comments on commit 0b3e438

Please sign in to comment.