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
+1 -2
View File
@@ -1,7 +1,6 @@
import { Component, OnInit, ViewChild, Inject, LOCALE_ID, Input } from '@angular/core';
import { Component, OnInit, ViewChild, Inject, LOCALE_ID } from '@angular/core';
import { CalendarComponent } from 'ionic2-calendar';
import { AlertController, ModalController } from '@ionic/angular';
import { formatDate } from '@angular/common';
import { EventsService } from 'src/app/services/events.service';
import { Event } from '../../models/event.model';
import { Router, NavigationEnd } from '@angular/router';
+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) {
-2
View File
@@ -6,7 +6,6 @@ import { ToastService } from 'src/app/services/toast.service';
import { environment } from 'src/environments/environment';
import { AlertController } from '@ionic/angular';
import { NotificationsService } from 'src/app/services/notifications.service';
import crypto from 'crypto-js'
import { LocalstoreService } from 'src/app/store/localstore.service';
import { SessionStore } from 'src/app/store/session.service';
@@ -40,7 +39,6 @@ export class LoginPage implements OnInit {
ngOnInit() {
let userData = this.sessionStore.user
const loginPreference = userData?.LoginPreference