mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improve
This commit is contained in:
@@ -42,6 +42,8 @@ export class WsChatMethodsService {
|
||||
sessionStore = SessionStore
|
||||
|
||||
loggedUser: any;
|
||||
|
||||
delete = []
|
||||
|
||||
constructor(
|
||||
private WsChatService: WsChatService,
|
||||
@@ -68,7 +70,7 @@ export class WsChatMethodsService {
|
||||
|
||||
this.WsChatService.registerCallback({
|
||||
type: 'reConnect',
|
||||
funx: ()=>{
|
||||
funx: () => {
|
||||
/**
|
||||
* @description when the phone is in the background for a long time it could disconnects from the socket then the socket reconnects automatically,
|
||||
* when the connection is lost the subscribe is also lost, so we have to subscribe again when reconnection is establish.
|
||||
@@ -363,10 +365,16 @@ export class WsChatMethodsService {
|
||||
|
||||
|
||||
deleteRoom(roomId) {
|
||||
|
||||
this.delete.push(roomId)
|
||||
delete this.group[roomId];
|
||||
this._group = this._group.filter((e)=> e.id != roomId);
|
||||
}
|
||||
|
||||
deleteRecently(roomId) {
|
||||
return this.delete.includes(roomId)
|
||||
}
|
||||
|
||||
roomExist(roomId) {
|
||||
return this.dm[roomId]?.id || this.group[roomId]?.id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user