mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 04:01:34 +00:00
Merge pull request #1484 from RoboSats/disable-android-notifications
fix notification not raising on first run
This commit is contained in:
commit
237e80b045
@ -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 ?? '{}');
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user