From 9625ea910fa71426681ba044609354e7e04d847e Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 18 Sep 2024 16:54:21 +0200 Subject: [PATCH] fix notification not raising on first run --- mobile/App.tsx | 2 +- .../android/app/src/main/java/com/robosats/MainActivity.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mobile/App.tsx b/mobile/App.tsx index 4af1e29d..75b63ea7 100644 --- a/mobile/App.tsx +++ b/mobile/App.tsx @@ -97,7 +97,7 @@ const App = () => { SystemModule.useProxy(useProxy ?? 'true'); }); loadCookie('settings_stop_notifications').then((stopNotifications) => { - SystemModule.stopNotifications(stopNotifications ?? 'true'); + SystemModule.stopNotifications(stopNotifications ?? 'false'); }); loadCookie('garage_slots').then((slots) => { NotificationsModule.monitorOrders(slots ?? '{}'); diff --git a/mobile/android/app/src/main/java/com/robosats/MainActivity.java b/mobile/android/app/src/main/java/com/robosats/MainActivity.java index 3d1af957..54dbee87 100644 --- a/mobile/android/app/src/main/java/com/robosats/MainActivity.java +++ b/mobile/android/app/src/main/java/com/robosats/MainActivity.java @@ -33,7 +33,7 @@ public class MainActivity extends ReactActivity { SharedPreferences sharedPreferences = getApplicationContext() .getSharedPreferences(PREFS_NAME, ReactApplicationContext.MODE_PRIVATE); - String stop_notifications =sharedPreferences.getString(KEY_DATA, "false"); + String stop_notifications = sharedPreferences.getString(KEY_DATA, "false"); if (!Boolean.parseBoolean(stop_notifications)) { Intent serviceIntent = new Intent(getApplicationContext(), NotificationsService.class); getApplicationContext().startService(serviceIntent); @@ -92,7 +92,7 @@ public class MainActivity extends ReactActivity { SharedPreferences sharedPreferences = getApplicationContext() .getSharedPreferences(PREFS_NAME, ReactApplicationContext.MODE_PRIVATE); - String stop_notifications =sharedPreferences.getString(KEY_DATA, "false"); + String stop_notifications = sharedPreferences.getString(KEY_DATA, "false"); if (!Boolean.parseBoolean(stop_notifications)) { Intent serviceIntent = new Intent(getApplicationContext(), NotificationsService.class); getApplicationContext().startService(serviceIntent);