improve chat

This commit is contained in:
Peter Maquiran
2022-01-12 11:52:05 +01:00
parent b8b4ba6a05
commit 5552aa484b
13 changed files with 46 additions and 44 deletions
+3 -5
View File
@@ -28,7 +28,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
import { elementAt } from 'rxjs-compat/operator/elementAt';
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { ChatService as ChatServiceGPR} from 'src/app/services/chat/chat.service'
import { wsChatService as wsChatService} from 'src/app/services/chat/chat.service'
const IMAGE_DIR = 'stored-images';
@@ -96,7 +96,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
private changeDetectorRef: ChangeDetectorRef,
private platform: Platform,
private sqlservice: SqliteService,
public ChatServiceGPR: ChatServiceGPR
public wsChatService: wsChatService
) {
this.loggedUser = authService.ValidatedUserChat['data'];
this.roomId = this.navParams.get('roomId');
@@ -108,7 +108,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
};
this.ChatServiceGPR.getRoom(this.roomId).loadHistory()
this.wsChatService.getRoom(this.roomId).loadHistory()
}
@@ -335,8 +335,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
window.removeEventListener('scroll', this.scrollChangeCallback, true);
}
sendMessage() {
let body = {
"message":