Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.reactnativekeyboardcontroller.extensions
import android.annotation.SuppressLint
import android.content.ComponentName
import android.content.Context
import android.content.res.Configuration
import android.graphics.Point
import android.os.Build
import android.provider.Settings
Expand Down Expand Up @@ -40,12 +41,7 @@ fun Context.getDisplaySize(): Point {
}

fun Context.isSystemDarkMode(): Boolean =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
(getSystemService(Context.UI_MODE_SERVICE) as? android.app.UiModeManager)
?.nightMode == android.app.UiModeManager.MODE_NIGHT_YES
} else {
false
}
resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES

fun Context.currentImePackage(): String? {
val id =
Expand Down
1 change: 1 addition & 0 deletions src/components/KeyboardToolbar/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const ButtonAndroid = ({
theme,
}: PropsWithChildren<ButtonProps>) => {
const colorScheme = useKeyboardState((state) => state.appearance);

const accessibilityState = useMemo(() => ({ disabled }), [disabled]);
const ripple = useMemo(
() =>
Expand Down