File tree Expand file tree Collapse file tree 5 files changed +12
-6
lines changed Expand file tree Collapse file tree 5 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 90
90
91
91
# # Publish
92
92
93
- - Pull reques code review from a Branch team member
93
+ - Pull request code review from a Branch team member
94
94
95
95
- Merges will automatically add SDK to NPM
Original file line number Diff line number Diff line change 2
2
"name" : " branch-cordova-sdk" ,
3
3
"description" : " Branch Metrics Cordova SDK" ,
4
4
"main" : " www/branch.js" ,
5
- "version" : " 2.5.13 " ,
5
+ "version" : " 2.5.14 " ,
6
6
"homepage" : " https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking" ,
7
7
"repository" : {
8
8
"type" : " git" ,
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ SOFTWARE.
24
24
<plugin xmlns =" http://apache.org/cordova/ns/plugins/1.0"
25
25
xmlns : android =" http://schemas.android.com/apk/res/android"
26
26
id =" branch-cordova-sdk"
27
- version =" 2.5.13 " >
27
+ version =" 2.5.14 " >
28
28
29
29
<!-- DO NOT EDIT THIS FILE. MAKE ALL CHANGES TO plugin.template.xml INSTEAD -->
30
30
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ SOFTWARE.
24
24
<plugin xmlns =" http://apache.org/cordova/ns/plugins/1.0"
25
25
xmlns : android =" http://schemas.android.com/apk/res/android"
26
26
id =" branch-cordova-sdk"
27
- version =" 2.5.13 " >
27
+ version =" 2.5.14 " >
28
28
29
29
<!-- DO NOT EDIT THIS FILE. MAKE ALL CHANGES TO plugin.template.xml INSTEAD -->
30
30
Original file line number Diff line number Diff line change @@ -37,15 +37,21 @@ Branch.prototype.disableGlobalListenersWarnings = function () {
37
37
38
38
Branch . prototype . initSession = function ( deepLinkDataListener ) {
39
39
// private method to filter out +clicked_branch_link = false in deep link callback
40
+ var previous = ''
40
41
var deepLinkDataParser = function ( deepLinkData ) {
41
42
var isBranchLink = '+clicked_branch_link'
42
43
var isNonBranchLink = '+non_branch_link'
44
+ // TODO: figure out why iOS SDK passes data twice on Ionic 2 terminated and no network connection
45
+ var isNewData = JSON . stringify ( deepLinkData ) !== previous
46
+ var isBranchLinkClick = deepLinkData . hasOwnProperty ( isBranchLink ) && deepLinkData [ isBranchLink ] === true
47
+ var isNonBranchLinkClick = deepLinkData . hasOwnProperty ( isNonBranchLink )
43
48
44
- // +clicked_branch_link' = true || +non_branch_link
45
- if ( ( deepLinkData . hasOwnProperty ( isBranchLink ) && deepLinkData [ isBranchLink ] === true ) || ( deepLinkData . hasOwnProperty ( isNonBranchLink ) ) ) {
49
+ // is +clicked_branch_link' = true || +non_branch_link
50
+ if ( isNewData && ( isBranchLinkClick || isNonBranchLinkClick ) ) {
46
51
// to Branch.initSession(function(data) {})
47
52
deepLinkDataListener ( deepLinkData )
48
53
}
54
+ previous = JSON . stringify ( deepLinkData )
49
55
}
50
56
51
57
if ( ! disableGlobalListenersWarnings && ! deepLinkDataListener && ! window . DeepLinkHandler ) {
You can’t perform that action at this time.
0 commit comments