mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-12 20:57:45 +02:00
Refresh communication queries on workspace change (#9723)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
+1
-1
Submodule communication updated: 407c52ca43...9673971e92
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
import { initLiveQueries, refreshLiveQueries } from '@hcengineering/communication-client-query'
|
||||
import { closeLiveQueries, initLiveQueries, refreshLiveQueries } from '@hcengineering/communication-client-query'
|
||||
import {
|
||||
type AddAttachmentsOperation,
|
||||
type AddCollaboratorsEvent,
|
||||
@@ -458,3 +458,8 @@ export async function refreshCommunicationClient (): Promise<void> {
|
||||
console.log('refreshCommunicationClient')
|
||||
await refreshLiveQueries()
|
||||
}
|
||||
|
||||
export async function purgeCommunicationClient (): Promise<void> {
|
||||
client.close()
|
||||
closeLiveQueries()
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ import platform, {
|
||||
import presentation, {
|
||||
loadServerConfig,
|
||||
purgeClient,
|
||||
purgeCommunicationClient,
|
||||
refreshClient,
|
||||
refreshCommunicationClient,
|
||||
setClient,
|
||||
@@ -175,6 +176,7 @@ export async function connect (title: string): Promise<Client | undefined> {
|
||||
// We need to flush all data from memory
|
||||
await ctx.with('purge-client', {}, async () => {
|
||||
await purgeClient()
|
||||
await purgeCommunicationClient()
|
||||
})
|
||||
await ctx.with('close previous client', {}, async () => {
|
||||
await _client?.close()
|
||||
|
||||
Reference in New Issue
Block a user