Feature(imagequeue): (hopefully) handle some edge cases correctly

This commit is contained in:
Pieter Vander Vennet 2025-04-07 04:11:16 +02:00
parent 6925b3d26e
commit aa373ee698
4 changed files with 21 additions and 6 deletions

View file

@ -7,6 +7,7 @@ import { Changes } from "./Changes"
import { Utils } from "../../Utils"
import FeaturePropertiesStore from "../FeatureSource/Actors/FeaturePropertiesStore"
import { AndroidPolyfill } from "../Web/AndroidPolyfill"
import ImageUploadQueue from "../ImageProviders/ImageUploadQueue"
export interface ChangesetTag {
key: string
@ -358,7 +359,8 @@ export class ChangesetHandler {
const [oldId, newId] = mapping
this.allElements?.addAlias(oldId, newId)
if (newId !== undefined) {
this._remappings.set(mapping[0], mapping[1])
this._remappings.set(oldId, newId)
ImageUploadQueue.singleton.applyRemapping(oldId, newId)
}
}
return new Map<string, string>(mappings)