1
0
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:
Laurent Cozic
2019-07-29 15:43:53 +02:00
parent 64b7bc3d62
commit 86dc72b204
170 changed files with 4140 additions and 3119 deletions

View File

@@ -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;