add back patch
This commit is contained in:
+1
-1
@@ -173,7 +173,7 @@
|
|||||||
"react-native-drawer-layout": "^4.0.3",
|
"react-native-drawer-layout": "^4.0.3",
|
||||||
"react-native-gesture-handler": "2.20.2",
|
"react-native-gesture-handler": "2.20.2",
|
||||||
"react-native-get-random-values": "~1.11.0",
|
"react-native-get-random-values": "~1.11.0",
|
||||||
"react-native-image-crop-picker": "0.41.6",
|
"react-native-image-crop-picker": "^0.41.6",
|
||||||
"react-native-ios-context-menu": "^1.15.3",
|
"react-native-ios-context-menu": "^1.15.3",
|
||||||
"react-native-keyboard-controller": "^1.14.5",
|
"react-native-keyboard-controller": "^1.14.5",
|
||||||
"react-native-mmkv": "^2.12.2",
|
"react-native-mmkv": "^2.12.2",
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
diff --git a/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/PathView.java b/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/PathView.java
|
||||||
|
index 06829bd..1b15818 100644
|
||||||
|
--- a/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/PathView.java
|
||||||
|
+++ b/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/PathView.java
|
||||||
|
@@ -14,17 +14,33 @@ import android.graphics.Paint;
|
||||||
|
import android.graphics.Path;
|
||||||
|
import com.facebook.react.bridge.ReactContext;
|
||||||
|
|
||||||
|
+import java.util.ArrayList;
|
||||||
|
+import java.util.HashMap;
|
||||||
|
+
|
||||||
|
+class ParsedPath {
|
||||||
|
+ final Path path;
|
||||||
|
+ final ArrayList<PathElement> elements;
|
||||||
|
+
|
||||||
|
+ ParsedPath(Path path, ArrayList<PathElement> elements) {
|
||||||
|
+ this.path = path;
|
||||||
|
+ this.elements = elements;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
@SuppressLint("ViewConstructor")
|
||||||
|
class PathView extends RenderableView {
|
||||||
|
private Path mPath;
|
||||||
|
|
||||||
|
+ // This grows forever but for our use case (static icons) it's ok.
|
||||||
|
+ private static final HashMap<String, ParsedPath> sPathCache = new HashMap<>();
|
||||||
|
+
|
||||||
|
public PathView(ReactContext reactContext) {
|
||||||
|
super(reactContext);
|
||||||
|
PathParser.mScale = mScale;
|
||||||
|
mPath = new Path();
|
||||||
|
}
|
||||||
|
|
||||||
|
- public void setD(String d) {
|
||||||
|
+ void setDByParsing(String d) {
|
||||||
|
mPath = PathParser.parse(d);
|
||||||
|
elements = PathParser.elements;
|
||||||
|
for (PathElement elem : elements) {
|
||||||
|
@@ -33,6 +49,17 @@ class PathView extends RenderableView {
|
||||||
|
point.y *= mScale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public void setD(String d) {
|
||||||
|
+ ParsedPath cached = sPathCache.get(d);
|
||||||
|
+ if (cached != null) {
|
||||||
|
+ mPath = cached.path;
|
||||||
|
+ elements = cached.elements;
|
||||||
|
+ } else {
|
||||||
|
+ setDByParsing(d);
|
||||||
|
+ sPathCache.put(d, new ParsedPath(mPath, elements));
|
||||||
|
+ }
|
||||||
|
invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
@@ -15901,7 +15901,7 @@ react-native-get-random-values@~1.11.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
fast-base64-decode "^1.0.0"
|
fast-base64-decode "^1.0.0"
|
||||||
|
|
||||||
react-native-image-crop-picker@0.41.6:
|
react-native-image-crop-picker@^0.41.6:
|
||||||
version "0.41.6"
|
version "0.41.6"
|
||||||
resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.41.6.tgz#de2c00102f4c934848fa11ff2335f29f5dc6b3e3"
|
resolved "https://registry.yarnpkg.com/react-native-image-crop-picker/-/react-native-image-crop-picker-0.41.6.tgz#de2c00102f4c934848fa11ff2335f29f5dc6b3e3"
|
||||||
integrity sha512-oyEVkiJX1cnjYJolQluOqXxz9xhLHrv+pyCs7+jA87yaa110/0jv1UCqxjVjxueKug7zk/UnjG7i9Ks1cGyLpA==
|
integrity sha512-oyEVkiJX1cnjYJolQluOqXxz9xhLHrv+pyCs7+jA87yaa110/0jv1UCqxjVjxueKug7zk/UnjG7i9Ks1cGyLpA==
|
||||||
|
|||||||
Reference in New Issue
Block a user