@@ -5517,7 +5517,7 @@ var qm = {
5517
5517
refreshIfEmpty : function ( successHandler , errorHandler ) {
5518
5518
if ( ! qm . notifications . getNumberInGlobalsOrLocalStorage ( ) ) {
5519
5519
qm . qmLog . info ( 'No notifications in local storage' ) ;
5520
- qm . notifications . post ( successHandler , errorHandler ) ;
5520
+ qm . notifications . syncTrackingReminderNotifications ( successHandler , errorHandler ) ;
5521
5521
return true ;
5522
5522
}
5523
5523
qm . qmLog . info ( qm . notifications . getNumberInGlobalsOrLocalStorage ( ) + ' notifications in local storage' ) ;
@@ -5528,7 +5528,7 @@ var qm = {
5528
5528
qm . qmLog . info ( "qm.notifications.refreshIfEmptyOrStale" ) ;
5529
5529
if ( ! qm . notifications . getNumberInGlobalsOrLocalStorage ( ) || qm . notifications . getSecondsSinceLastNotificationsRefresh ( ) > 3600 ) {
5530
5530
qm . qmLog . info ( 'Refreshing notifications because empty or last refresh was more than an hour ago' ) ;
5531
- qm . notifications . post ( callback ) ;
5531
+ qm . notifications . syncTrackingReminderNotifications ( callback ) ;
5532
5532
} else {
5533
5533
qm . qmLog . info ( 'Not refreshing notifications because last refresh was last than an hour ago and we have notifications in local storage' ) ;
5534
5534
if ( callback ) {
@@ -5620,7 +5620,7 @@ var qm = {
5620
5620
} else {
5621
5621
console . info ( 'No rating notifications for popup' ) ;
5622
5622
qm . notifications . getLastNotificationsRefreshTime ( ) ;
5623
- qm . notifications . post ( ) ;
5623
+ qm . notifications . syncTrackingReminderNotifications ( ) ;
5624
5624
return null ;
5625
5625
}
5626
5626
} ,
@@ -5629,7 +5629,7 @@ var qm = {
5629
5629
} ,
5630
5630
promise : null ,
5631
5631
refreshAndShowPopupIfNecessary : function ( notificationParams ) {
5632
- qm . notifications . post ( function ( response ) {
5632
+ qm . notifications . syncTrackingReminderNotifications ( function ( response ) {
5633
5633
var uniqueNotification = qm . notifications . getMostRecentUniqueNotificationNotInSyncQueue ( ) ;
5634
5634
function objectLength ( obj ) {
5635
5635
var result = 0 ;
@@ -5747,7 +5747,7 @@ var qm = {
5747
5747
if ( ! successHandler ) {
5748
5748
return null ;
5749
5749
}
5750
- qm . notifications . post ( function ( response ) {
5750
+ qm . notifications . syncTrackingReminderNotifications ( function ( response ) {
5751
5751
var notification = qm . notifications . getMostRecentNotification ( ) ;
5752
5752
if ( notification ) {
5753
5753
successHandler ( notification ) ;
@@ -5759,7 +5759,7 @@ var qm = {
5759
5759
schedulePost : function ( delayInMilliseconds ) {
5760
5760
var queue = qm . storage . getItem ( qm . items . notificationsSyncQueue ) ;
5761
5761
if ( queue && queue . length > 10 ) {
5762
- qm . notifications . post ( ) ;
5762
+ qm . notifications . syncTrackingReminderNotifications ( ) ;
5763
5763
return ;
5764
5764
}
5765
5765
if ( ! delayInMilliseconds ) {
@@ -5775,7 +5775,7 @@ var qm = {
5775
5775
}
5776
5776
setTimeout ( function ( ) {
5777
5777
qm . qmLog . info ( "Notifications sync countdown completed. Syncing now... " ) ;
5778
- qm . notifications . post ( ) ;
5778
+ qm . notifications . syncTrackingReminderNotifications ( ) ;
5779
5779
} , delayInMilliseconds ) ;
5780
5780
} else {
5781
5781
if ( ! qm . platform . isMobile ( ) ) { // Better performance
@@ -5804,8 +5804,8 @@ var qm = {
5804
5804
qm . notifications . deleteByVariableName ( n . variableName ) ;
5805
5805
qm . notifications . addToSyncQueue ( n ) ;
5806
5806
} ,
5807
- post : function ( successHandler , errorHandler ) {
5808
- qm . qmLog . debug ( "Called postNotifications ..." ) ;
5807
+ syncTrackingReminderNotifications : function ( successHandler , errorHandler ) {
5808
+ qm . qmLog . debug ( "Called syncTrackingReminderNotifications ..." ) ;
5809
5809
var notifications = qm . storage . getItem ( qm . items . notificationsSyncQueue ) ;
5810
5810
qm . storage . removeItem ( qm . items . notificationsSyncQueue ) ;
5811
5811
qm . storage . removeItem ( qm . items . trackingReminderNotificationSyncScheduled ) ;
0 commit comments