This commit is contained in:
2018-12-19 17:16:34 +01:00
parent b33313eed9
commit cb049224dd
3 changed files with 16 additions and 12 deletions

View File

@@ -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);
}
});
});