From e804b77b02bbba0bd067689479a964a0cda0ece4 Mon Sep 17 00:00:00 2001 From: feruz Date: Sat, 7 Aug 2021 10:37:55 +0300 Subject: [PATCH] relinker android and tags type check --- android/app/build.gradle | 1 + .../main/java/app/esteem/mobile/android/MainApplication.java | 5 +++++ android/build.gradle | 1 + src/components/postView/view/postDisplayView.js | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 7db680d21..f09743a98 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -209,6 +209,7 @@ dependencies { implementation 'com.android.support:multidex:2.0.1' implementation project(':@react-native-community_viewpager') implementation 'com.google.firebase:firebase-analytics:17.2.3' + implementation 'com.getkeepsafe.relinker:relinker:1.4.4' if (enableHermes) { def hermesPath = "../../node_modules/hermes-engine/android/"; diff --git a/android/app/src/main/java/app/esteem/mobile/android/MainApplication.java b/android/app/src/main/java/app/esteem/mobile/android/MainApplication.java index 910a1530f..d005b6eb9 100644 --- a/android/app/src/main/java/app/esteem/mobile/android/MainApplication.java +++ b/android/app/src/main/java/app/esteem/mobile/android/MainApplication.java @@ -10,6 +10,7 @@ import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; import androidx.multidex.MultiDexApplication; +import com.getkeepsafe.relinker.ReLinker; import com.bugsnag.android.Bugsnag; //See below, Webview debugging @@ -53,6 +54,10 @@ public class MainApplication extends MultiDexApplication implements ReactApplica @Override public void onCreate() { super.onCreate(); + // Relink bugsnag for ndk and anr cases + ReLinker.loadLibrary(this, "bugsnag-ndk"); + ReLinker.loadLibrary(this, "bugsnag-plugin-android-anr"); + // Start bugsnag Bugsnag.start(this /* app context */); SoLoader.init(this, /* native exopackage */ false); // Uncomment below line to Debug Webview diff --git a/android/build.gradle b/android/build.gradle index a7dfbd3ea..26e7d0778 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -52,6 +52,7 @@ allprojects { google() jcenter() maven { url "https://www.jitpack.io" } + // mavenCentral() } } diff --git a/src/components/postView/view/postDisplayView.js b/src/components/postView/view/postDisplayView.js index 60a367287..d7ae53461 100644 --- a/src/components/postView/view/postDisplayView.js +++ b/src/components/postView/view/postDisplayView.js @@ -62,7 +62,7 @@ const PostDisplayView = ({ useEffect(() => { if (post) { const _tags = get(post.json_metadata, 'tags', []); - if (post.category && _tags[0] !== post.category) { + if (post.category && _tags[0] !== post.category && Array.isArray(tags)) { _tags.splice(0, 0, post.category); } setTags(_tags);