mirror of
https://github.com/readest/readest.git
synced 2026-04-29 12:00:49 +00:00
This commit is contained in:
parent
f2f744a2fe
commit
f46be89036
16 changed files with 156 additions and 29 deletions
|
|
@ -533,6 +533,12 @@ class NativeBridgePlugin: Plugin {
|
|||
invoke.resolve(["purchases": restored])
|
||||
}
|
||||
}
|
||||
|
||||
@objc public func get_system_color_scheme(_ invoke: Invoke) {
|
||||
let userInterfaceStyle = UITraitCollection.current.userInterfaceStyle
|
||||
let colorScheme = (userInterfaceStyle == .dark) ? "dark" : "light"
|
||||
invoke.resolve(["colorScheme": colorScheme])
|
||||
}
|
||||
}
|
||||
|
||||
@_cdecl("init_plugin_native_bridge")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue