From 2f6b0a904b9b70bbd076c51c8f39a93013206ea2 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Thu, 10 Feb 2022 22:33:43 +0100 Subject: [PATCH] improve --- src/app/services/chat/room.service.ts | 10 +--------- src/environments/environment.ts | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/app/services/chat/room.service.ts b/src/app/services/chat/room.service.ts index 6a1901ded..925b26eea 100644 --- a/src/app/services/chat/room.service.ts +++ b/src/app/services/chat/room.service.ts @@ -283,11 +283,6 @@ export class RoomService { } const message: MessageService = this.prepareMessage(offlineChatMessage, environment.chatOffline) - - - setTimeout(() => { - this.scrollDown() - }, 150) message.send().then((ChatMessage) => { this.updateMessageDB(ChatMessage, localReference) @@ -404,11 +399,10 @@ export class RoomService { if(wewMessage.offline == false) { this.prepareMessage(ChatMessage) } else { - const offlineMessage = this.prepareMessage(ChatMessage) this.messagesLocalReference.push(offlineMessage.localReference) - offlineMessage.send().then((newChatMessage)=>{ + offlineMessage.send().then((newChatMessage) => { this.updateMessageDB(newChatMessage, ChatMessage.localReference) }) @@ -435,8 +429,6 @@ export class RoomService { } await this.WsChatService.loadHistory(this.id, limit).then( async (chatHistory:chatHistory) => { - console.log('loadHistory', chatHistory) - await chatHistory.result.messages.reverse().forEach( async (message) => { diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 6bf93dabc..cd809f519 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -13,7 +13,7 @@ export const environment = { domain: 'gabinetedigital.local', //gabinetedigital.local defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto paulo.pinto@gabinetedigital.local defaultuserpwd: 'tabteste@006', //tabteste@006, - chatOffline: false + chatOffline: true }; /*