relinker android and tags type check

This commit is contained in:
feruz 2021-08-07 10:37:55 +03:00
parent d115a1dab9
commit e804b77b02
4 changed files with 8 additions and 1 deletions

View File

@ -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/";

View File

@ -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

View File

@ -52,6 +52,7 @@ allprojects {
google()
jcenter()
maven { url "https://www.jitpack.io" }
// mavenCentral()
}
}

View File

@ -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);