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 signingConfig signingConfigs.debug
} }
release { 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' def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false'
shrinkResources enableShrinkResources.toBoolean() shrinkResources enableShrinkResources.toBoolean()
minifyEnabled enableMinifyInReleaseBuilds minifyEnabled enableMinifyInReleaseBuilds

View File

@ -6,38 +6,26 @@ import android.content.res.Configuration
import com.facebook.react.PackageList import com.facebook.react.PackageList
import com.facebook.react.ReactApplication import com.facebook.react.ReactApplication
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage import com.facebook.react.ReactPackage
import com.facebook.react.ReactHost import com.facebook.react.ReactHost
import com.facebook.react.common.ReleaseLevel import com.facebook.react.common.ReleaseLevel
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
import com.facebook.react.defaults.DefaultReactNativeHost
import expo.modules.ApplicationLifecycleDispatcher import expo.modules.ApplicationLifecycleDispatcher
import expo.modules.ReactNativeHostWrapper import expo.modules.ExpoReactHostFactory
class MainApplication : Application(), ReactApplication { class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost = ReactNativeHostWrapper( override val reactHost: ReactHost by lazy {
this, ExpoReactHostFactory.getDefaultReactHost(
object : DefaultReactNativeHost(this) { context = applicationContext,
override fun getPackages(): List<ReactPackage> = packageList =
PackageList(this).packages.apply { PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example: // Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage()) // 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() { override fun onCreate() {
super.onCreate() super.onCreate()

View File

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