Created
December 5, 2020 05:21
-
-
Save putrarifin/7acfb5c48f5fb97ca56b28116450a3c6 to your computer and use it in GitHub Desktop.
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
suspend fun setUiMode(uiMode: UiMode) { | |
dataStore.edit { preferences -> | |
preferences[IS_DARK_MODE] = when (uiMode) { | |
UiMode.LIGHT -> false | |
UiMode.DARK -> true | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment