Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cordova-plugin-local-notifications
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
cordova-plugin-local-notifications
Commits
703d40c8
Commit
703d40c8
authored
Aug 16, 2017
by
Sebastián Katzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed support to query for notifications by type and id
parent
7a2e4478
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
121 deletions
+9
-121
local-notification-core.js
www/local-notification-core.js
+3
-80
local-notification.js
www/local-notification.js
+6
-41
No files found.
www/local-notification-core.js
View file @
703d40c8
...
...
@@ -222,18 +222,11 @@ exports.isTriggered = function (id, callback, scope) {
*
* @return [ Void ]
*/
exports
.
get
All
Ids
=
function
(
callback
,
scope
)
{
exports
.
getIds
=
function
(
callback
,
scope
)
{
this
.
exec
(
'ids'
,
null
,
callback
,
scope
);
};
/**
* Alias for `getAllIds`.
*/
exports
.
getIds
=
function
()
{
this
.
getAllIds
.
apply
(
this
,
arguments
);
};
/**
* List of all scheduled notification IDs.
*
* @param [ Function ] callback The function to be exec as the callback.
...
...
@@ -301,92 +294,22 @@ exports.getAll = function (callback, scope) {
};
/**
* List of scheduled notifications specified by id.
* If called without IDs, all notification will be returned.
*
* @param [ Array<Int> ] ids The IDs of the notifications.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports
.
getScheduled
=
function
()
{
var
args
=
Array
.
apply
(
null
,
arguments
);
if
(
typeof
args
[
0
]
==
'function'
)
{
args
.
unshift
([]);
}
var
ids
=
args
[
0
],
callback
=
args
[
1
],
scope
=
args
[
2
];
if
(
!
Array
.
isArray
(
ids
))
{
ids
=
[
ids
];
}
if
(
!
Array
.
isArray
(
ids
))
{
this
.
exec
(
'scheduledNotification'
,
Number
(
ids
),
callback
,
scope
);
return
;
}
ids
=
this
.
convertIds
(
ids
);
this
.
exec
(
'scheduledNotifications'
,
ids
,
callback
,
scope
);
};
/**
* List of all scheduled notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*/
exports
.
get
All
Scheduled
=
function
(
callback
,
scope
)
{
exports
.
getScheduled
=
function
(
callback
,
scope
)
{
this
.
exec
(
'scheduledNotifications'
,
null
,
callback
,
scope
);
};
/**
* List of triggered notifications specified by id.
* If called without IDs, all notification will be returned.
*
* @param [ Array<Int> ] ids The IDs of the notifications.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports
.
getTriggered
=
function
()
{
var
args
=
Array
.
apply
(
null
,
arguments
);
if
(
typeof
args
[
0
]
==
'function'
)
{
args
.
unshift
([]);
}
var
ids
=
args
[
0
],
callback
=
args
[
1
],
scope
=
args
[
2
];
if
(
!
Array
.
isArray
(
ids
))
{
ids
=
[
ids
];
}
if
(
!
Array
.
isArray
(
ids
))
{
this
.
exec
(
'triggeredNotification'
,
Number
(
ids
),
callback
,
scope
);
return
;
}
ids
=
this
.
convertIds
(
ids
);
this
.
exec
(
'triggeredNotifications'
,
ids
,
callback
,
scope
);
};
/**
* List of all triggered notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*/
exports
.
get
All
Triggered
=
function
(
callback
,
scope
)
{
exports
.
getTriggered
=
function
(
callback
,
scope
)
{
this
.
exec
(
'triggeredNotifications'
,
null
,
callback
,
scope
);
};
...
...
www/local-notification.js
View file @
703d40c8
...
...
@@ -171,15 +171,8 @@ exports.isTriggered = function (id, callback, scope) {
*
* @return [ Void ]
*/
exports
.
getAllIds
=
function
(
callback
,
scope
)
{
this
.
core
.
getAllIds
(
callback
,
scope
);
};
/**
* Alias for `getAllIds`.
*/
exports
.
getIds
=
function
()
{
this
.
getAllIds
.
apply
(
this
,
arguments
);
exports
.
getIds
=
function
(
callback
,
scope
)
{
this
.
core
.
getIds
(
callback
,
scope
);
};
/**
...
...
@@ -233,41 +226,13 @@ exports.getAll = function (callback, scope) {
};
/**
* List of scheduled notifications specified by id.
* If called without IDs, all notification will be returned.
*
* @param [ Array<Int> ] ids The IDs of the notifications.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports
.
getScheduled
=
function
(
ids
,
callback
,
scope
)
{
this
.
core
.
getScheduled
(
ids
,
callback
,
scope
);
};
/**
* List of all scheduled notifications.
*
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*/
exports
.
getAllScheduled
=
function
(
callback
,
scope
)
{
this
.
core
.
getAllScheduled
(
callback
,
scope
);
};
/**
* List of triggered notifications specified by id.
* If called without IDs, all notification will be returned.
*
* @param [ Array<Int> ] ids The IDs of the notifications.
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*
* @return [ Void ]
*/
exports
.
getTriggered
=
function
(
ids
,
callback
,
scope
)
{
this
.
core
.
getTriggered
(
ids
,
callback
,
scope
);
exports
.
getScheduled
=
function
(
callback
,
scope
)
{
this
.
core
.
getScheduled
(
callback
,
scope
);
};
/**
...
...
@@ -276,8 +241,8 @@ exports.getTriggered = function (ids, callback, scope) {
* @param [ Function ] callback The function to be exec as the callback.
* @param [ Object ] scope The callback function's scope.
*/
exports
.
get
All
Triggered
=
function
(
callback
,
scope
)
{
this
.
core
.
get
All
Triggered
(
callback
,
scope
);
exports
.
getTriggered
=
function
(
callback
,
scope
)
{
this
.
core
.
getTriggered
(
callback
,
scope
);
};
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment