add synchro

This commit is contained in:
Peter Maquiran
2021-08-30 10:24:46 +01:00
parent e953831a73
commit 4309d01376
24 changed files with 338 additions and 113 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ import { ContactsPage } from 'src/app/pages/chat/messages/contacts/contacts.page
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { connection } from 'src/app/services/socket/synchro.service';
import { synchro } from 'src/app/services/socket/synchro.service';
import { ToastService } from 'src/app/services/toast.service';
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/messages-options.page';
@@ -33,7 +33,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
members:any;
scrollingOnce:boolean = true;
connection = connection;
synchro = synchro;
chatMessageStore = ChatMessageStore
chatUserStorage = ChatUserStorage
@@ -258,7 +258,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
if (res == 502) {
// Connection timeout
// happens when the connection was pending for too long
// happens when the synchro was pending for too long
// let's reconnect
await this.serverLongPull();
} else if (res != 200) {