Fix sharing condition
This commit is contained in:
parent
0f0f3ae0c6
commit
87813d3005
|
@ -30,15 +30,15 @@ export function answerEntryHandler(event: Event): void {
|
||||||
updateDeleteButton(false);
|
updateDeleteButton(false);
|
||||||
showNotification(data.message);
|
showNotification(data.message);
|
||||||
|
|
||||||
const sharing = inboxEntry.querySelector<HTMLElement>('.inbox-entry__sharing');
|
|
||||||
if (sharing != null) {
|
|
||||||
sharing.dataset.inboxSharingConfigValue = JSON.stringify(data.sharing);
|
|
||||||
}
|
|
||||||
|
|
||||||
const shareButton = inboxEntry.querySelector<HTMLButtonElement>('[data-controller="share"]');
|
const shareButton = inboxEntry.querySelector<HTMLButtonElement>('[data-controller="share"]');
|
||||||
if (shareButton != null) {
|
if (shareButton != null) {
|
||||||
shareButton.dataset.shareTextValue = decodeURIComponent(data.sharing.custom).replaceAll('+', ' ');
|
shareButton.dataset.shareTextValue = decodeURIComponent(data.sharing.custom).replaceAll('+', ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const sharing = inboxEntry.querySelector<HTMLElement>('.inbox-entry__sharing');
|
||||||
|
if (sharing != null) {
|
||||||
|
sharing.dataset.inboxSharingConfigValue = JSON.stringify(data.sharing);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
(inboxEntry as HTMLElement).remove();
|
(inboxEntry as HTMLElement).remove();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue