mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
fix notification not raising on first run
This commit is contained in:
parent
4c6f86d7c1
commit
9625ea910f
@ -97,7 +97,7 @@ const App = () => {
|
|||||||
SystemModule.useProxy(useProxy ?? 'true');
|
SystemModule.useProxy(useProxy ?? 'true');
|
||||||
});
|
});
|
||||||
loadCookie('settings_stop_notifications').then((stopNotifications) => {
|
loadCookie('settings_stop_notifications').then((stopNotifications) => {
|
||||||
SystemModule.stopNotifications(stopNotifications ?? 'true');
|
SystemModule.stopNotifications(stopNotifications ?? 'false');
|
||||||
});
|
});
|
||||||
loadCookie('garage_slots').then((slots) => {
|
loadCookie('garage_slots').then((slots) => {
|
||||||
NotificationsModule.monitorOrders(slots ?? '{}');
|
NotificationsModule.monitorOrders(slots ?? '{}');
|
||||||
|
@ -33,7 +33,7 @@ public class MainActivity extends ReactActivity {
|
|||||||
SharedPreferences sharedPreferences =
|
SharedPreferences sharedPreferences =
|
||||||
getApplicationContext()
|
getApplicationContext()
|
||||||
.getSharedPreferences(PREFS_NAME, ReactApplicationContext.MODE_PRIVATE);
|
.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)) {
|
if (!Boolean.parseBoolean(stop_notifications)) {
|
||||||
Intent serviceIntent = new Intent(getApplicationContext(), NotificationsService.class);
|
Intent serviceIntent = new Intent(getApplicationContext(), NotificationsService.class);
|
||||||
getApplicationContext().startService(serviceIntent);
|
getApplicationContext().startService(serviceIntent);
|
||||||
@ -92,7 +92,7 @@ public class MainActivity extends ReactActivity {
|
|||||||
SharedPreferences sharedPreferences =
|
SharedPreferences sharedPreferences =
|
||||||
getApplicationContext()
|
getApplicationContext()
|
||||||
.getSharedPreferences(PREFS_NAME, ReactApplicationContext.MODE_PRIVATE);
|
.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)) {
|
if (!Boolean.parseBoolean(stop_notifications)) {
|
||||||
Intent serviceIntent = new Intent(getApplicationContext(), NotificationsService.class);
|
Intent serviceIntent = new Intent(getApplicationContext(), NotificationsService.class);
|
||||||
getApplicationContext().startService(serviceIntent);
|
getApplicationContext().startService(serviceIntent);
|
||||||
|
Loading…
Reference in New Issue
Block a user