Skip to content

Commit

Permalink
dep(@notifee/react-native): rebase and linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Calinteodor committed Dec 11, 2024
1 parent b8df6b5 commit 4ea24fa
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions index.android.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
import './react/index.native';
import notifee, {EventType} from '@notifee/react-native';
import notifee, { EventType } from '@notifee/react-native';

import logger from './react/features/app/logger';
import './react/index.native';

// Needs to be registered outside any React components as early as possible
await notifee.registerForegroundService(() => {

Check failure on line 7 in index.android.js

View workflow job for this annotation

GitHub Actions / Lint

Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`
return new Promise(resolve => {
return new Promise(() => {
logger.warn('Foreground service running');

notifee.onBackgroundEvent(async event => {
if (event.type === EventType.ACTION_PRESS && event.detail.pressAction.id === 'hang-up') {
console.log('HANG UP BUTTON PRESSED BACKGROUND');
}

return resolve();
});

notifee.onForegroundEvent(async ({ type, detail }) => {
if (type === EventType.ACTION_PRESS && detail.pressAction.id === 'hang-up') {
console.log('HANG UP BUTTON PRESSED');
}

return resolve();
});
});
});

0 comments on commit 4ea24fa

Please sign in to comment.