move the null check at getSharedTheme cursor
This commit is contained in:
parent
c4b6502dae
commit
460e996a83
1 changed files with 2 additions and 2 deletions
|
@ -275,8 +275,8 @@ fun Context.getSharedTheme(callback: (sharedTheme: SharedTheme?) -> Unit) {
|
|||
Thread {
|
||||
val cursor = cursorLoader.loadInBackground()
|
||||
|
||||
cursor.use {
|
||||
if (cursor?.moveToFirst() == true) {
|
||||
cursor?.use {
|
||||
if (cursor.moveToFirst()) {
|
||||
val textColor = cursor.getIntValue(COL_TEXT_COLOR)
|
||||
val backgroundColor = cursor.getIntValue(COL_BACKGROUND_COLOR)
|
||||
val primaryColor = cursor.getIntValue(COL_PRIMARY_COLOR)
|
||||
|
|
Loading…
Reference in a new issue