Merge pull request 'fix(renderers): hide alternative name card on extra ordinary vessels detail' (#80) from fix/remove-eov-alt-name into main
Reviewed-on: https://10.10.0.4/AcuPedia/acupedia-mobile-ui/pulls/80 Reviewed-by: Amit Salunke <amit@noreply.localhost>
This commit is contained in:
commit
130f635017
|
|
@ -123,9 +123,7 @@ android {
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
// Caution! In production, you need to generate your own keystore file.
|
signingConfig (keystorePropertiesFile.exists() ? signingConfigs.release : signingConfigs.debug)
|
||||||
// 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
|
||||||
|
|
|
||||||
|
|
@ -6,26 +6,38 @@ 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.ExpoReactHostFactory
|
import expo.modules.ReactNativeHostWrapper
|
||||||
|
|
||||||
class MainApplication : Application(), ReactApplication {
|
class MainApplication : Application(), ReactApplication {
|
||||||
|
|
||||||
override val reactHost: ReactHost by lazy {
|
override val reactNativeHost: ReactNativeHost = ReactNativeHostWrapper(
|
||||||
ExpoReactHostFactory.getDefaultReactHost(
|
this,
|
||||||
context = applicationContext,
|
object : DefaultReactNativeHost(this) {
|
||||||
packageList =
|
override fun getPackages(): List<ReactPackage> =
|
||||||
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()
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ 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",
|
||||||
|
|
@ -61,7 +63,9 @@ export function ExtraOrdinaryVesselsDetailRenderer({
|
||||||
const subtitle =
|
const subtitle =
|
||||||
asString(data.sub_title) ||
|
asString(data.sub_title) ||
|
||||||
asString(data.subtitle) ||
|
asString(data.subtitle) ||
|
||||||
undefined;
|
(asStringArray(data.alt_name).length > 0
|
||||||
|
? 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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue