Skip to content

Commit

Permalink
refactor: Refactoring of surface screen
Browse files Browse the repository at this point in the history
  • Loading branch information
tzebrowski committed Jul 18, 2024
1 parent 3388703 commit 749b3d1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ internal class SurfaceScreen(
}

fun renderFrame() {
if (isAllowedFrameRendering()) {
if (isScreenAllowedForFrameRendering(screenId)) {
surfaceController.renderFrame()
}
}
Expand Down Expand Up @@ -258,6 +258,6 @@ internal class SurfaceScreen(
mapColor(settings.getColorTheme().actionsBtnVirtualScreensColor)
}

private fun isAllowedFrameRendering() = screenId == GIULIA_SCREEN_ID ||
private fun isScreenAllowedForFrameRendering(screenId: Int) = screenId == GIULIA_SCREEN_ID ||
screenId == DRAG_RACING_SCREEN_ID || screenId == TRIP_INFO_SCREEN_ID
}

0 comments on commit 749b3d1

Please sign in to comment.