From 09fd6388312214736ba876ee7cbb2912d912ec53 Mon Sep 17 00:00:00 2001 From: feruz Date: Mon, 25 Jan 2021 23:03:20 +0200 Subject: [PATCH] fix restarting issue --- ios/Podfile.lock | 6 ++++++ package.json | 1 + src/screens/application/screen/errorBoundary.js | 5 +++-- yarn.lock | 5 +++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 9a2ba2dea..a96a4fefb 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -320,6 +320,8 @@ PODS: - React - react-native-receive-sharing-intent (1.0.4): - React + - react-native-restart (0.0.17): + - React - react-native-safe-area-context (3.1.9): - React-Core - react-native-splash-screen (3.2.0): @@ -454,6 +456,7 @@ DEPENDENCIES: - react-native-matomo-sdk (from `../node_modules/react-native-matomo-sdk`) - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" - react-native-receive-sharing-intent (from `../node_modules/react-native-receive-sharing-intent`) + - react-native-restart (from `../node_modules/react-native-restart`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - react-native-splash-screen (from `../node_modules/react-native-splash-screen`) - react-native-version-number (from `../node_modules/react-native-version-number`) @@ -568,6 +571,8 @@ EXTERNAL SOURCES: :path: "../node_modules/@react-native-community/netinfo" react-native-receive-sharing-intent: :path: "../node_modules/react-native-receive-sharing-intent" + react-native-restart: + :path: "../node_modules/react-native-restart" react-native-safe-area-context: :path: "../node_modules/react-native-safe-area-context" react-native-splash-screen: @@ -680,6 +685,7 @@ SPEC CHECKSUMS: react-native-matomo-sdk: 025c54f92e1e26a4d0acee7c3f28cb0fc7e4729c react-native-netinfo: a53b00d949b6456913aaf507d9dba90c4008c611 react-native-receive-sharing-intent: feba0a332a07977549a85aa58b496eb44368366a + react-native-restart: d19a0f8d053d065fe64cd2baebb6487111c77149 react-native-safe-area-context: b6e0e284002381d2ff29fa4fff42b4d8282e3c94 react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865 react-native-version-number: b415bbec6a13f2df62bf978e85bc0d699462f37f diff --git a/package.json b/package.json index 9b99e25d8..d54689170 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "react-native-qrcode-svg": "^6.0.3", "react-native-reanimated": "^1.3.0", "react-native-receive-sharing-intent": "ecency/react-native-receive-sharing-intent", + "react-native-restart": "0.0.17", "react-native-safe-area-context": "^3.1.9", "react-native-screens": "^2.9.0", "react-native-scrollable-tab-view": "ecency/react-native-scrollable-tab-view", diff --git a/src/screens/application/screen/errorBoundary.js b/src/screens/application/screen/errorBoundary.js index 9011e0389..4bc0d6c9f 100644 --- a/src/screens/application/screen/errorBoundary.js +++ b/src/screens/application/screen/errorBoundary.js @@ -1,6 +1,7 @@ import React, { Fragment } from 'react'; -import { Text, View, NativeModules, TouchableHighlight } from 'react-native'; +import { Text, View, TouchableHighlight } from 'react-native'; import { injectIntl } from 'react-intl'; +import RNRestart from 'react-native-restart'; import { Icon } from '../../../components'; @@ -43,7 +44,7 @@ class ErrorBoundary extends React.Component { id: 'alert.something_wrong_alt', })} - NativeModules.DevSettings.reload()}> + RNRestart.Restart()}> {intl.formatMessage({ diff --git a/yarn.lock b/yarn.lock index 843a6b888..57ae33028 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7863,6 +7863,11 @@ react-native-redash@^14.2.4: normalize-svg-path "^1.0.1" parse-svg-path "^0.1.2" +react-native-restart@0.0.17: + version "0.0.17" + resolved "https://registry.yarnpkg.com/react-native-restart/-/react-native-restart-0.0.17.tgz#c1f38e019d1a2114248d496698e7951e9435ba91" + integrity sha512-UwFPDssMFoyDbF2aLARIHWt5g/o0TtxCXK9WIY+0iNpkgG9qWd+n80XBwXioNCdgy39ZQ5yfJBJRwtMLDgABag== + react-native-safe-area-context@^3.1.9: version "3.1.9" resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-3.1.9.tgz#48864ea976b0fa57142a2cc523e1fd3314e7247e"