From 12437e6b7c16824f014634120124f9b700a23ccd Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Thu, 2 Jun 2022 22:38:48 +0530 Subject: [PATCH] Fix App getting stucked on logout (#13427) https://github.com/status-im/status-go/compare/1bfde4c4...869942c0 --- .../app/src/main/res/values-night/colors.xml | 4 ++-- android/app/src/main/res/values/styles.xml | 6 ++--- .../status/ethereum/module/StatusModule.java | 22 ++++++++++++++----- .../pushnotifications/PushNotification.java | 2 +- .../PushNotificationHelper.java | 2 +- status-go-version.json | 6 ++--- 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/android/app/src/main/res/values-night/colors.xml b/android/app/src/main/res/values-night/colors.xml index b658d34131..eb75d8dd2b 100644 --- a/android/app/src/main/res/values-night/colors.xml +++ b/android/app/src/main/res/values-night/colors.xml @@ -1,5 +1,5 @@ - #141414 - #ffffff + #141414 + #ffffff diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index ef26f5b839..504077f1b0 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -24,8 +24,8 @@ diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java index b644c58287..7a756707aa 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java @@ -403,12 +403,24 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL @ReactMethod public void logout() { Log.d(TAG, "logout"); - String result = Statusgo.logout(); - if (result.startsWith("{\"error\":\"\"")) { - Log.d(TAG, "Logout result: " + result); - } else { - Log.e(TAG, "Logout failed: " + result); + if (!checkAvailability()) { + System.exit(0); + return; } + + Runnable r = new Runnable() { + @Override + public void run() { + String result = Statusgo.logout(); + if (result.startsWith("{\"error\":\"\"")) { + Log.d(TAG, "Logout result: " + result); + } else { + Log.e(TAG, "Logout failed: " + result); + } + } + }; + + StatusThreadPoolExecutor.getInstance().execute(r); } private void deleteDirectory(File folder) { diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/pushnotifications/PushNotification.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/pushnotifications/PushNotification.java index 5af0bc09e2..630e59e6da 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/pushnotifications/PushNotification.java +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/pushnotifications/PushNotification.java @@ -126,7 +126,7 @@ public class PushNotification extends ReactContextBaseJavaModule implements Acti @ReactMethod public void clearAllMessageNotifications() { - pushNotificationHelper.clearAllMessageNotifications(); + pushNotificationHelper.clearAllMessageNotifications(); } @ReactMethod diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/pushnotifications/PushNotificationHelper.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/pushnotifications/PushNotificationHelper.java index 4cda0ab6bb..c6a7fe4d94 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/pushnotifications/PushNotificationHelper.java +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/pushnotifications/PushNotificationHelper.java @@ -200,7 +200,7 @@ public class PushNotificationHelper { } public void clearAllMessageNotifications() { - notificationManager.cancelAll(); + notificationManager.cancelAll(); } public void sendToNotificationCentreWithPicture(final Bundle bundle, Bitmap largeIconBitmap, Bitmap bigPictureBitmap) { diff --git a/status-go-version.json b/status-go-version.json index df61c0a605..6346ccc7ab 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v0.100.0", - "commit-sha1": "1bfde4c4cc69292875ae9fdc41a8b4bd29e95a7a", - "src-sha256": "1nkk7dsqz1x31n305p33jdwpqr9bm7ajkqs3khq5l4ag3njagbrh" + "version": "v0.100.1", + "commit-sha1": "869942c05e04fa6e5d5105d3f5642f6a5ff28fcb", + "src-sha256": "0krig4rggbd6aryczig4r70fcn8fmfki52s931zyn3nqmjr386xh" }