From a246b695583cffc120b3301ade99571b2df16bea Mon Sep 17 00:00:00 2001 From: Kristina Date: Thu, 22 Feb 2024 22:04:04 +0400 Subject: [PATCH] UBERF-5628: fix unexpected Reference object in Activity on mentions in description (#4753) Signed-off-by: Kristina Fefelova --- models/chunter/src/index.ts | 13 +++++++++++++ models/chunter/src/plugin.ts | 1 + .../src/components/ChannelScrollView.svelte | 4 +++- .../src/components/JumpToDateSelector.svelte | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index c3c4085758..f8445f6048 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -559,6 +559,19 @@ export function createModel (builder: Builder, options = { addApplication: true chunter.ids.BacklinkCreatedActivityViewlet ) + builder.createDoc( + activity.class.DocUpdateMessageViewlet, + core.space.Model, + { + objectClass: chunter.class.Backlink, + action: 'update', + component: chunter.component.BacklinkContent, + labelComponent: chunter.activity.BacklinkCreatedLabel, + hideIfRemoved: true + }, + chunter.ids.BacklinkUpdateActivityViewlet + ) + builder.createDoc( activity.class.DocUpdateMessageViewlet, core.space.Model, diff --git a/models/chunter/src/plugin.ts b/models/chunter/src/plugin.ts index e9baeaf6f1..7192212621 100644 --- a/models/chunter/src/plugin.ts +++ b/models/chunter/src/plugin.ts @@ -89,6 +89,7 @@ export default mergeIds(chunterId, chunter, { TxChatMessageRemove: '' as Ref, ChunterNotificationGroup: '' as Ref, BacklinkCreatedActivityViewlet: '' as Ref, + BacklinkUpdateActivityViewlet: '' as Ref, BacklinkRemovedActivityViewlet: '' as Ref }, activity: { diff --git a/plugins/chunter-resources/src/components/ChannelScrollView.svelte b/plugins/chunter-resources/src/components/ChannelScrollView.svelte index b2b0f38d54..896fc66fe8 100644 --- a/plugins/chunter-resources/src/components/ChannelScrollView.svelte +++ b/plugins/chunter-resources/src/components/ChannelScrollView.svelte @@ -343,6 +343,8 @@ return } + updateSelectedDate() + if (selectedMessageId !== undefined && messages.some(({ _id }) => _id === selectedMessageId)) { isScrollInitialized = true await wait() @@ -465,7 +467,7 @@ {#if startFromBottom}
{/if} - {#if withDates && selectedDate} + {#if withDates && displayMessages.length > 0}
diff --git a/plugins/chunter-resources/src/components/JumpToDateSelector.svelte b/plugins/chunter-resources/src/components/JumpToDateSelector.svelte index 8b8f04c25b..4d7e760922 100644 --- a/plugins/chunter-resources/src/components/JumpToDateSelector.svelte +++ b/plugins/chunter-resources/src/components/JumpToDateSelector.svelte @@ -59,6 +59,7 @@ position: relative; flex-shrink: 0; margin: 0.25rem 0; + height: 1.875rem; &:not(:first-child)::after { position: absolute;