Theme switching

This commit is contained in:
2021-02-21 00:31:02 +03:00
parent 06aa41cab1
commit 35c45fd34f
34 changed files with 447 additions and 155 deletions
@@ -17,15 +17,6 @@ object Utils {
return context.getString(R.string.error, t.message.toString())
}
fun isDarkTheme(): Boolean {
val currentNightMode =
AppGlobal.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
return when (currentNightMode) {
Configuration.UI_MODE_NIGHT_YES -> true
else -> false
}
}
fun serialize(source: Any?): ByteArray? {
try {
val bos = BytesOutputStream()