/commet-only-why-if-logic.kt Secret
Last active
July 12, 2020 08:27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun foo(ui: Ui, system: System) { | |
// Remove right margin when the theme is light and the layout is a list | |
if (inLightModeWithItemsInList(ui, system)) { | |
val uiContainer = ui.container | |
uiContainer.rightMargin = 0 | |
} | |
} | |
private fun inLightModeWithItemsInList(ui: Ui, system: System): Boolean { | |
return !ui.itemsAreInGrid() && !system.isDarkThemeEnabled() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment