mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { AfterViewChecked, AfterViewInit, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router'
|
||||
import { ModalController, NavParams, PopoverController } from '@ionic/angular';
|
||||
import { map } from 'rxjs/operators';
|
||||
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';
|
||||
@@ -151,7 +152,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
loadMessages() {
|
||||
this.showLoader = true;
|
||||
const roomId = this.roomId
|
||||
|
||||
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
|
||||
/* console.log(res); */
|
||||
this.messages = res['messages'].reverse();
|
||||
@@ -252,9 +253,18 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
async serverLongPull() {
|
||||
alert('YAS')
|
||||
|
||||
const roomId = this.roomId
|
||||
this.chatService.getRoomMessages(roomId).subscribe(async res => {
|
||||
|
||||
this.chatService.getRoomMessages(roomId).subscribe(res=>{
|
||||
console.log(res);
|
||||
|
||||
})
|
||||
|
||||
|
||||
/* this.chatService.getRoomMessages(roomId).subscribe(async res => {
|
||||
|
||||
|
||||
if (res == 502) {
|
||||
// Connection timeout
|
||||
@@ -287,7 +297,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
//this.loadMessages()
|
||||
await this.serverLongPull();
|
||||
}
|
||||
});
|
||||
}); */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user