Remove extra query params and apply (#5546)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-05-08 19:26:42 +04:00 committed by GitHub
parent f75641125f
commit 7ee0b0060c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 5 additions and 8 deletions

View File

@ -17,7 +17,6 @@
import { Doc, Ref, SortingOrder } from '@hcengineering/core' import { Doc, Ref, SortingOrder } from '@hcengineering/core'
import { createQuery, getClient } from '@hcengineering/presentation' import { createQuery, getClient } from '@hcengineering/presentation'
import { Component, Grid, Label, Lazy, Spinner } from '@hcengineering/ui' import { Component, Grid, Label, Lazy, Spinner } from '@hcengineering/ui'
import { onMount } from 'svelte'
import ActivityExtensionComponent from './ActivityExtension.svelte' import ActivityExtensionComponent from './ActivityExtension.svelte'
import ActivityFilter from './ActivityFilter.svelte' import ActivityFilter from './ActivityFilter.svelte'
@ -49,7 +48,7 @@
const res = activityMessagesQuery.query( const res = activityMessagesQuery.query(
activity.class.ActivityMessage, activity.class.ActivityMessage,
{ attachedTo: objectId, hidden: { $ne: true } }, { attachedTo: objectId },
(result: ActivityMessage[]) => { (result: ActivityMessage[]) => {
void combineActivityMessages(result, order).then((messages) => { void combineActivityMessages(result, order).then((messages) => {
activityMessages = messages activityMessages = messages

View File

@ -159,7 +159,7 @@ export class ChannelDataProvider implements IChannelDataProvider {
this.metadataQuery.query( this.metadataQuery.query(
this.msgClass, this.msgClass,
{ attachedTo: this.chatId, hidden: { $ne: true } }, { attachedTo: this.chatId },
(res) => { (res) => {
this.updatesDates(res) this.updatesDates(res)
this.metadataStore.set(res) this.metadataStore.set(res)
@ -235,7 +235,6 @@ export class ChannelDataProvider implements IChannelDataProvider {
this.msgClass, this.msgClass,
{ {
attachedTo: this.chatId, attachedTo: this.chatId,
hidden: { $ne: true },
...(this.tailStart !== undefined ? { createdOn: { $gte: this.tailStart } } : {}) ...(this.tailStart !== undefined ? { createdOn: { $gte: this.tailStart } } : {})
}, },
async (res) => { async (res) => {

View File

@ -19,7 +19,6 @@
import { Channel } from '@hcengineering/chunter' import { Channel } from '@hcengineering/chunter'
import { ActivityMessagesFilter } from '@hcengineering/activity' import { ActivityMessagesFilter } from '@hcengineering/activity'
import contact from '@hcengineering/contact' import contact from '@hcengineering/contact'
import { DocNotifyContext } from '@hcengineering/notification'
import Header from './Header.svelte' import Header from './Header.svelte'
import chunter from '../plugin' import chunter from '../plugin'

View File

@ -101,7 +101,7 @@
async function onMessage (event: CustomEvent) { async function onMessage (event: CustomEvent) {
loading = true loading = true
const doneOp = await getClient().measure(`chunter.create.${_class}`) const doneOp = await getClient().measure(`chunter.create.${_class} ${object._class}`)
try { try {
draftController.remove() draftController.remove()
inputRef.removeDraft(false) inputRef.removeDraft(false)

View File

@ -491,7 +491,7 @@ async function OnChannelMembersChanged (tx: TxUpdateDoc<Channel>, control: Trigg
lastViewedTimestamp: tx.modifiedOn lastViewedTimestamp: tx.modifiedOn
}) })
await control.apply([updateTx], true) res.push(updateTx)
} }
} }

View File

@ -411,7 +411,7 @@ export async function pushInboxNotifications (
const updateTx = control.txFactory.createTxUpdateDoc(context._class, context.space, context._id, { const updateTx = control.txFactory.createTxUpdateDoc(context._class, context.space, context._id, {
lastUpdateTimestamp: modifiedOn lastUpdateTimestamp: modifiedOn
}) })
await control.apply([updateTx], true) res.push(updateTx)
} }
docNotifyContextId = context._id docNotifyContextId = context._id
} }