mirror of
https://github.com/readest/readest.git
synced 2026-04-29 12:00:49 +00:00
chore(opds): disable popular online opds catalogs in certain regions on App Store (#3031)
This commit is contained in:
parent
d1d0d2d59c
commit
48920a87bf
18 changed files with 170 additions and 46 deletions
|
|
@ -879,6 +879,16 @@ class NativeBridgePlugin: Plugin {
|
|||
invoke.reject("Failed to copy file: \(error.localizedDescription)")
|
||||
}
|
||||
}
|
||||
|
||||
@objc public func get_storefront_region_code(_ invoke: Invoke) {
|
||||
Task {
|
||||
if let storefront = await Storefront.current {
|
||||
invoke.resolve(["regionCode": storefront.countryCode])
|
||||
} else {
|
||||
invoke.reject("Failed to get region code")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@_cdecl("init_plugin_native_bridge")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue