mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
Fix blinks on thread open, messages reading (#4743)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
9ccf593737
commit
44a6147368
@ -145,7 +145,7 @@
|
||||
{:else}
|
||||
<div class="embeddedMarker" />
|
||||
{/if}
|
||||
<div class="flex-col ml-2 w-full clear-mins">
|
||||
<div class="flex-col ml-2 w-full clear-mins message-content">
|
||||
<div class="header clear-mins">
|
||||
{#if person}
|
||||
<EmployeePresenter value={person} shouldShowAvatar={false} />
|
||||
@ -242,10 +242,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&:hover > .actions {
|
||||
visibility: visible;
|
||||
}
|
||||
@ -322,4 +318,10 @@
|
||||
left: -0.5rem;
|
||||
color: var(--white-color);
|
||||
}
|
||||
|
||||
.message-content {
|
||||
height: max-content;
|
||||
flex-shrink: 1;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
@ -97,6 +97,7 @@
|
||||
function scrollToBottom (afterScrollFn?: () => void) {
|
||||
if (scroller !== undefined && scrollElement !== undefined) {
|
||||
scroller.scrollBy(scrollElement.scrollHeight)
|
||||
updateSelectedDate()
|
||||
afterScrollFn?.()
|
||||
}
|
||||
}
|
||||
@ -208,7 +209,7 @@
|
||||
let scrollToRestore = 0
|
||||
|
||||
function loadMore () {
|
||||
if (!loadMoreAllowed || $isLoadingMoreStore || !scrollElement) {
|
||||
if (!loadMoreAllowed || $isLoadingMoreStore || !scrollElement || isInitialScrolling) {
|
||||
return
|
||||
}
|
||||
|
||||
@ -293,7 +294,7 @@
|
||||
void readChannelMessages(messagesToRead, notifyContext)
|
||||
}
|
||||
|
||||
async function updateSelectedDate () {
|
||||
function updateSelectedDate () {
|
||||
if (!withDates) {
|
||||
return
|
||||
}
|
||||
@ -351,8 +352,10 @@
|
||||
isScrollInitialized = true
|
||||
shouldWaitAndRead = true
|
||||
autoscroll = true
|
||||
shouldScrollToNew = true
|
||||
waitLastMessageRenderAndRead(() => {
|
||||
isInitialScrolling = false
|
||||
autoscroll = false
|
||||
})
|
||||
} else if (separatorElement) {
|
||||
isScrollInitialized = true
|
||||
@ -399,6 +402,7 @@
|
||||
}
|
||||
|
||||
scrollToLastMessage = true
|
||||
scrollToBottom()
|
||||
scrollUntilSeeLastMessage()
|
||||
}
|
||||
|
||||
@ -439,6 +443,7 @@
|
||||
await wait()
|
||||
scrollToDate(dateToJump)
|
||||
} else if (newCount > messagesCount) {
|
||||
await wait()
|
||||
scrollToNewMessages()
|
||||
}
|
||||
|
||||
|
@ -19,4 +19,4 @@
|
||||
export let message: ActivityMessage
|
||||
</script>
|
||||
|
||||
<ActivityMessagePresenter value={message} hideFooter hoverStyles="filledHover" withShowMore={false} />
|
||||
<ActivityMessagePresenter value={message} hideFooter hoverStyles="filledHover" withShowMore={false} skipLabel />
|
||||
|
Loading…
Reference in New Issue
Block a user