Compare commits

..

No commits in common. "130f635017c8ca0364ace5b49601caa4be9849ec" and "98efd5899da681e913113453950986b7de8bb86a" have entirely different histories.

3 changed files with 11 additions and 25 deletions

View File

@ -123,7 +123,9 @@ android {
signingConfig signingConfigs.debug
}
release {
signingConfig (keystorePropertiesFile.exists() ? signingConfigs.release : signingConfigs.debug)
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false'
shrinkResources enableShrinkResources.toBoolean()
minifyEnabled enableMinifyInReleaseBuilds

View File

@ -6,38 +6,26 @@ import android.content.res.Configuration
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.ReactHost
import com.facebook.react.common.ReleaseLevel
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
import com.facebook.react.defaults.DefaultReactNativeHost
import expo.modules.ApplicationLifecycleDispatcher
import expo.modules.ReactNativeHostWrapper
import expo.modules.ExpoReactHostFactory
class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost = ReactNativeHostWrapper(
this,
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
override val reactHost: ReactHost by lazy {
ExpoReactHostFactory.getDefaultReactHost(
context = applicationContext,
packageList =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
}
override fun getJSMainModuleName(): String = ".expo/.virtual-metro-entry"
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
)
override val reactHost: ReactHost
get() = ReactNativeHostWrapper.createReactHost(applicationContext, reactNativeHost)
)
}
override fun onCreate() {
super.onCreate()

View File

@ -29,8 +29,6 @@ const RESERVED_KEYS = new Set([
"title",
"sub_title",
"subtitle",
"alt_name",
"alternative_names",
"code",
"sort_order",
"link",
@ -63,9 +61,7 @@ export function ExtraOrdinaryVesselsDetailRenderer({
const subtitle =
asString(data.sub_title) ||
asString(data.subtitle) ||
(asStringArray(data.alt_name).length > 0
? asStringArray(data.alt_name).join(", ")
: undefined);
undefined;
const mediaValue = data.images ?? data.media ?? data.point_images;
const media = Array.isArray(mediaValue)