From cb049224dd9685ea15ee532a281bfbc69b298d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Fr=C3=B6hle?= Date: Wed, 19 Dec 2018 17:16:34 +0100 Subject: [PATCH] v2 trans --- dist/autoloader.js | 2 +- dist/autoloaderV2.js | 14 ++++++++------ src/autoloaderV2.js | 12 +++++++----- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/dist/autoloader.js b/dist/autoloader.js index 4120931..ffb469b 100755 --- a/dist/autoloader.js +++ b/dist/autoloader.js @@ -1,4 +1,4 @@ -/*Generated on:Wed Dec 19 2018 17:12:10 GMT+0100 (CET)*/ +/*Generated on:Wed Dec 19 2018 17:16:34 GMT+0100 (CET)*/ var AutomaticDispose_Branch = "master"; var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/"; var da_lss_adis_time = new Date().getTime(); diff --git a/dist/autoloaderV2.js b/dist/autoloaderV2.js index 1115f50..590a34c 100644 --- a/dist/autoloaderV2.js +++ b/dist/autoloaderV2.js @@ -1,4 +1,4 @@ -/*Generated on:Wed Dec 19 2018 17:12:10 GMT+0100 (CET)*/ +/*Generated on:Wed Dec 19 2018 17:16:34 GMT+0100 (CET)*/ /* * Dexie.js - a minimalistic wrapper for IndexedDB * =============================================== @@ -17274,12 +17274,13 @@ class AutomaticDispose { $("#adis-sprechwunsch-rescue-frame").attr("src", "https://www.leitstellenspiel.de/vehicles/" + VehicleID); $("#adis-sprechwunsch-rescue-frame").attr("vehicle_id", VehicleID); - self.RescueVehicleFrameWatchDog = setTimeout(async () => { + self.RescueVehicleFrameWatchDog = setTimeout(async function () { + let self = this; self.RemoveRescueSprechwunschFromQueue(VehicleID).then((deleteCount) => { $("#adis-sprechwunsch-rescue-frame").attr("src", ""); $("#adis-sprechwunsch-rescue-frame").attr("vehicle_id", "empty"); }); - }, 1500); + }.bind(self), 1500); } }); }); @@ -17467,7 +17468,7 @@ class AutomaticDispose { OpenNextPoliceSprechwunsch() { let self = this; return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunschPolice], async () => { - this.ADSettings().then((setting) => { + return this.ADSettings().then((setting) => { if (setting['Sprechwunsch-Automatic'] == 'true') { return self.ADisDB.ADisSprechwunschPolice.where({ done: 'false' @@ -17482,12 +17483,13 @@ class AutomaticDispose { $("#adis-sprechwunsch-police-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID); $("#adis-sprechwunsch-police-frame").attr("mission_id", MissionID); - self.PoliceVehicleFrameWatchDog = setTimeout(async (MissionID) => { + self.PoliceVehicleFrameWatchDog = setTimeout(async function (MissionID) { + let self = this; self.RemovePoliceSprechwunschFromQueue(MissionID).then((deleteCount) => { $("#adis-sprechwunsch-police-frame").attr("src", ""); $("#adis-sprechwunsch-police-frame").attr("mission_id", "empty"); }); - }, 1500, MissionID); + }.bind(self), 1500, MissionID); } }); }); diff --git a/src/autoloaderV2.js b/src/autoloaderV2.js index f4041d6..f3f87d1 100644 --- a/src/autoloaderV2.js +++ b/src/autoloaderV2.js @@ -267,12 +267,13 @@ class AutomaticDispose { $("#adis-sprechwunsch-rescue-frame").attr("src", "https://www.leitstellenspiel.de/vehicles/" + VehicleID); $("#adis-sprechwunsch-rescue-frame").attr("vehicle_id", VehicleID); - self.RescueVehicleFrameWatchDog = setTimeout(async () => { + self.RescueVehicleFrameWatchDog = setTimeout(async function () { + let self = this; self.RemoveRescueSprechwunschFromQueue(VehicleID).then((deleteCount) => { $("#adis-sprechwunsch-rescue-frame").attr("src", ""); $("#adis-sprechwunsch-rescue-frame").attr("vehicle_id", "empty"); }); - }, 1500); + }.bind(self), 1500); } }); }); @@ -460,7 +461,7 @@ class AutomaticDispose { OpenNextPoliceSprechwunsch() { let self = this; return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunschPolice], async () => { - this.ADSettings().then((setting) => { + return this.ADSettings().then((setting) => { if (setting['Sprechwunsch-Automatic'] == 'true') { return self.ADisDB.ADisSprechwunschPolice.where({ done: 'false' @@ -475,12 +476,13 @@ class AutomaticDispose { $("#adis-sprechwunsch-police-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID); $("#adis-sprechwunsch-police-frame").attr("mission_id", MissionID); - self.PoliceVehicleFrameWatchDog = setTimeout(async (MissionID) => { + self.PoliceVehicleFrameWatchDog = setTimeout(async function (MissionID) { + let self = this; self.RemovePoliceSprechwunschFromQueue(MissionID).then((deleteCount) => { $("#adis-sprechwunsch-police-frame").attr("src", ""); $("#adis-sprechwunsch-police-frame").attr("mission_id", "empty"); }); - }, 1500, MissionID); + }.bind(self), 1500, MissionID); } }); });