v2 up 9g0a903292kjl<f

This commit is contained in:
2018-12-17 15:38:50 +01:00
parent 27f1319162
commit 178d847871
3 changed files with 38 additions and 34 deletions

View File

@@ -857,24 +857,26 @@ class AutomaticDispose {
CollectMissions() {
const self = this;
self.ADSettings().then((setting) => {
self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], async () => {
self.ADSettings().then((setting) => {
return self.ADisDB.ADisMissions.toCollection()
}).then((Missions) => {
if (typeof Missions !== "undefined") {
}).then((Missions) => {
if (typeof Missions !== "undefined") {
return Missions.count((count) => {
if (count > 0) {
return Missions.each((MyMission) => {
var MissionElement = $("#mission_" + MyMission.missionID);
if (MissionElement.length == 0 ){
// remove
console.log("Remove :", MyMission)
self.RemoveMissionsFromQueue(MyMission.missionID)
}
});
}
});
}
return Missions.count((count) => {
if (count > 0) {
return Missions.each((MyMission) => {
var MissionElement = $("#mission_" + MyMission.missionID);
if (MissionElement.length == 0) {
// remove
console.log("Remove :", MyMission)
self.RemoveMissionsFromQueue(MyMission.missionID)
}
});
}
});
}
});
});