You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
First pass at linting lib dir
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
const PushNotification = require('react-native-push-notification');
|
||||
|
||||
class AlarmServiceDriver {
|
||||
|
||||
PushNotificationHandler_() {
|
||||
if (!this.PushNotification_) {
|
||||
PushNotification.configure({
|
||||
// (required) Called when a remote or local notification is opened or received
|
||||
onNotification: function(notification) {
|
||||
console.info('Notification was opened: ', notification );
|
||||
// process the notification
|
||||
},
|
||||
popInitialNotification: true,
|
||||
requestPermissions: true,
|
||||
// (required) Called when a remote or local notification is opened or received
|
||||
onNotification: function(notification) {
|
||||
console.info('Notification was opened: ', notification);
|
||||
// process the notification
|
||||
},
|
||||
popInitialNotification: true,
|
||||
requestPermissions: true,
|
||||
});
|
||||
|
||||
this.PushNotification_ = PushNotification;
|
||||
@@ -25,13 +24,13 @@ class AlarmServiceDriver {
|
||||
}
|
||||
|
||||
notificationIsSet(alarmId) {
|
||||
throw new Error('Available only for non-persistent alarms');
|
||||
throw new Error('Available only for non-persistent alarms');
|
||||
}
|
||||
|
||||
async clearNotification(id) {
|
||||
return this.PushNotificationHandler_().cancelLocalNotifications({id: id+''});
|
||||
return this.PushNotificationHandler_().cancelLocalNotifications({ id: id + '' });
|
||||
}
|
||||
|
||||
|
||||
async scheduleNotification(notification) {
|
||||
const config = {
|
||||
id: notification.id + '',
|
||||
@@ -41,7 +40,6 @@ class AlarmServiceDriver {
|
||||
|
||||
this.PushNotificationHandler_().localNotificationSchedule(config);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = AlarmServiceDriver;
|
||||
module.exports = AlarmServiceDriver;
|
||||
|
||||
Reference in New Issue
Block a user