Fixes to favourites

This commit is contained in:
Pieter Vander Vennet 2023-12-03 04:49:28 +01:00
parent d959b6b40b
commit 1a9a5b45c1
4 changed files with 8 additions and 79 deletions

View file

@ -107,7 +107,8 @@ export class ImageUploadManager {
title,
description,
file,
targetKey
targetKey,
tags.data["_orig_theme"]
)
if (!isNaN(Number(featureId))) {
// This is a map note
@ -126,7 +127,8 @@ export class ImageUploadManager {
title: string,
description: string,
blob: File,
targetKey: string | undefined
targetKey: string | undefined,
theme?: string
): Promise<LinkImageAction> {
this.increaseCountFor(this._uploadStarted, featureId)
const properties = this._featureProperties.getStore(featureId)
@ -148,7 +150,7 @@ export class ImageUploadManager {
console.log("Uploading done, creating action for", featureId)
key = targetKey ?? key
const action = new LinkImageAction(featureId, key, value, properties, {
theme: this._layout.id,
theme: theme ?? this._layout.id,
changeType: "add-image",
})
this.increaseCountFor(this._uploadFinished, featureId)