Skip to content

Commit

Permalink
Merge pull request #1484 from RoboSats/disable-android-notifications
Browse files Browse the repository at this point in the history
fix notification not raising on first run
  • Loading branch information
KoalaSat authored Sep 18, 2024
2 parents cf6aacb + 9625ea9 commit 237e80b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mobile/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '{}');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected void onCreate(Bundle savedInstanceState) {
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);
Expand Down Expand Up @@ -92,7 +92,7 @@ public void onRequestPermissionsResult(int requestCode, String[] permissions, in
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);
Expand Down

0 comments on commit 237e80b

Please sign in to comment.