mirror of
https://github.com/status-im/status-react.git
synced 2025-01-10 19:16:59 +00:00
make isNodeInitialized instance variable
re-init jail on Android
This commit is contained in:
parent
e47314bb7e
commit
19e3be5109
@ -19,7 +19,7 @@ public class StatusService extends Service {
|
||||
|
||||
private static final String TAG = "StatusService";
|
||||
|
||||
private static boolean isNodeInitialized = false;
|
||||
private boolean isNodeInitialized = false;
|
||||
private final Handler handler = new Handler();
|
||||
|
||||
private ExecutorService executor = null;
|
||||
@ -341,7 +341,7 @@ public class StatusService extends Service {
|
||||
|
||||
}
|
||||
|
||||
public static boolean isNodeInitialized() {
|
||||
public boolean isNodeInitialized() {
|
||||
return isNodeInitialized;
|
||||
}
|
||||
|
||||
|
@ -408,8 +408,10 @@
|
||||
(u/side-effect!
|
||||
(fn [_ [_ error]]
|
||||
(.log js/console error)
|
||||
(let [message (.-message error)]
|
||||
(when (or (re-find (re-pattern "Could not connect to the server.") message)
|
||||
(re-find (re-pattern "Failed to connect") message))
|
||||
(let [message (.-message error)
|
||||
ios-error? (re-find (re-pattern "Could not connect to the server.") message)
|
||||
android-error? (re-find (re-pattern "Failed to connect") message)]
|
||||
(when (or ios-error? android-error?)
|
||||
(when android-error? (status/init-jail))
|
||||
(status/restart-rpc)
|
||||
(dispatch [:load-commands!]))))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user