[] = []
- export let withDates: boolean = true
+ export let embedded = false
export let collection: string | undefined = undefined
export let showEmbedded = false
export let skipLabels = false
@@ -355,7 +355,7 @@
}
function updateSelectedDate (): void {
- if (!withDates) {
+ if (embedded) {
return
}
@@ -468,13 +468,13 @@
if (isLoading || !isScrollInitialized || isInitialScrolling) {
return
}
- const msg = messages.find(({ _id }) => _id === selectedMessageId)
+ const msg = $metadataStore.find(({ _id }) => _id === selectedMessageId)
if (msg !== undefined) {
const isReload = provider.jumpToMessage(msg)
if (isReload) {
reinitializeScroll()
}
- } else {
+ } else if (selectedMessageId === undefined) {
provider.jumpToEnd()
reinitializeScroll()
}
@@ -677,7 +677,7 @@
{#if startFromBottom}
{/if}
- {#if withDates && displayMessages.length > 0 && selectedDate}
+ {#if !embedded && displayMessages.length > 0 && selectedDate}
@@ -702,7 +702,7 @@
{/if}
- {#if displayMessages.length === 0 && !hierarchy.isDerived(objectClass, activity.class.ActivityMessage)}
+ {#if displayMessages.length === 0 && !embedded}
{/if}
- {#if withDates && message.createdOn && $datesStore.includes(message.createdOn)}
+ {#if !embedded && message.createdOn && $datesStore.includes(message.createdOn)}
{/if}
@@ -741,7 +741,7 @@
{/if}
- {#if showScrollDownButton}
+ {#if !embedded && showScrollDownButton}
): Promise {
+ const message = event.detail
+
+ if (isThreadMessage(message)) {
+ const location = getCurrentLocation()
+ location.path[4] = message.attachedTo
+ navigate(location)
+ }
+
+ messageInFocus.set(message._id)
+ }