Skip to content

Commit

Permalink
Move loading shared library to MarkdownParser (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw authored Dec 5, 2024
1 parent cc1188c commit b59720e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.facebook.react.bridge.ReactContext;
import com.facebook.react.util.RNLog;
import com.facebook.soloader.SoLoader;

import org.json.JSONArray;
import org.json.JSONException;
Expand All @@ -14,6 +15,10 @@
import java.util.List;

public class MarkdownParser {
static {
SoLoader.loadLibrary("livemarkdown");
}

private final @NonNull ReactContext mReactContext;
private String mPrevText;
private int mPrevParserId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@
import com.expensify.livemarkdown.spans.*;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.views.text.internal.span.CustomLineHeightSpan;
import com.facebook.soloader.SoLoader;

import java.util.List;
import java.util.Objects;

public class MarkdownUtils {
static {
SoLoader.loadLibrary("livemarkdown");
}

public MarkdownUtils(@NonNull ReactContext reactContext) {
mAssetManager = reactContext.getAssets();
mMarkdownParser = new MarkdownParser(reactContext);
Expand Down

0 comments on commit b59720e

Please sign in to comment.