fix notification not raising on first run

This commit is contained in:
koalasat 2024-09-18 16:54:21 +02:00
parent 4c6f86d7c1
commit 9625ea910f
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157
2 changed files with 3 additions and 3 deletions

View File

@ -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 ?? '{}');

View File

@ -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);