Fix sharing condition
This commit is contained in:
parent
0f0f3ae0c6
commit
87813d3005
|
@ -30,15 +30,15 @@ export function answerEntryHandler(event: Event): void {
|
|||
updateDeleteButton(false);
|
||||
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"]');
|
||||
if (shareButton != null) {
|
||||
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 {
|
||||
(inboxEntry as HTMLElement).remove();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue