Skip to content

Commit

Permalink
fix(universal-color-scheme): fix not reading initial colorName proper…
Browse files Browse the repository at this point in the history
…ly, fix by reading from Appearance on native
  • Loading branch information
natew committed Oct 8, 2024
1 parent 0e01ff8 commit 0c244c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/universal-color-scheme/src/colorScheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ if (process.env.TAMAGUI_TARGET === 'native') {
}
}
})

const cur = Appearance.getColorScheme()
if (cur && currentSetting === 'system') {
currentName = cur
}
}

export function useColorSchemeSetting() {
Expand Down

0 comments on commit 0c244c4

Please sign in to comment.