Skip to content

Commit 00d54f8

Browse files
authored
Merge branch 'develop' into feature/trackAll
2 parents 752c5b6 + 409c5f1 commit 00d54f8

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/js/qmHelpers.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,16 @@ var qm = {
194194
}
195195
return qmApiClient;
196196
},
197-
justUseBuiltInHttpCache: true, // Redundant and produces unexpected results
197+
useMemoryCache: true, // Redundant and produces unexpected results. However, have to keep using for now to prevent infinite loops.
198198
cacheSet: function(params, data, functionName){
199199
if(!qm.api.cache[functionName]){qm.api.cache[functionName] = {};}
200200
var key = qm.api.getCacheName(params);
201-
if(!qm.api.justUseBuiltInHttpCache){ // Redundant and produces unexpected results
201+
if(qm.api.useMemoryCache){ // Redundant and produces unexpected results. However, have to keep using for now to prevent infinite loops.
202202
qm.api.cache[functionName][key] = data;
203203
}
204204
},
205205
cacheGet: function(params, functionName){
206-
if(qm.api.justUseBuiltInHttpCache){ // Redundant and produces unexpected results
206+
if(!qm.api.useMemoryCache){ // Redundant and produces unexpected results. However, have to keep using for now to prevent infinite loops.
207207
return null;
208208
}
209209
if(params && params.refresh){
@@ -7709,17 +7709,13 @@ var qm = {
77097709
qm.storage.setItem(localStorageItemName, array);
77107710
},
77117711
deleteTrackingReminderNotification: function(body){
7712-
var trackingReminderNotificationId = body;
7713-
if(isNaN(trackingReminderNotificationId) && body.trackingReminderNotification){
7714-
trackingReminderNotificationId = body.trackingReminderNotification.id;
7715-
}
7716-
if(isNaN(trackingReminderNotificationId) && body.trackingReminderNotificationId){
7717-
trackingReminderNotificationId = body.trackingReminderNotificationId;
7718-
}
7712+
var id = body;
7713+
if(isNaN(id) && body.trackingReminderNotification){id = body.trackingReminderNotification.id;}
7714+
if(isNaN(id) && body.trackingReminderNotificationId){id = body.trackingReminderNotificationId;}
77197715
var notifications = qm.storage.getTrackingReminderNotifications();
77207716
if(notifications && notifications.length){
7721-
qm.qmLog.info(null, 'Deleting notification with id ' + trackingReminderNotificationId, null);
7722-
qm.storage.deleteById(qm.items.trackingReminderNotifications, trackingReminderNotificationId);
7717+
qm.qmLog.info('Deleting notification with id ' + id);
7718+
qm.storage.deleteById(qm.items.trackingReminderNotifications, id);
77237719
}else{
77247720
qm.notifications.refreshIfEmpty();
77257721
}

0 commit comments

Comments
 (0)