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:
@@ -176,7 +176,6 @@ export class WsChatMethodsService {
|
||||
await this.storage.remove('Rooms');
|
||||
} catch(e) {}
|
||||
|
||||
console.log(rooms,'=========!+!+!++!+=====')
|
||||
let index = 0
|
||||
|
||||
if(rooms?.result?.update) {
|
||||
@@ -220,7 +219,6 @@ export class WsChatMethodsService {
|
||||
|
||||
|
||||
await this.storage.set('Rooms', rooms);
|
||||
console.log('done get rooms')
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -249,7 +247,6 @@ export class WsChatMethodsService {
|
||||
*/
|
||||
subscribeToRoom() {
|
||||
|
||||
console.log('defaultSubtribe', this.dm)
|
||||
|
||||
for (const id in this.dm) {
|
||||
this.defaultSubtribe(id)
|
||||
@@ -259,8 +256,6 @@ export class WsChatMethodsService {
|
||||
this.defaultSubtribe(id)
|
||||
}
|
||||
|
||||
console.log("Done subcribe");
|
||||
|
||||
this.WsChatService.streamNotifyLogged().then((subscription=>{
|
||||
|
||||
}))
|
||||
@@ -287,33 +282,30 @@ export class WsChatMethodsService {
|
||||
* @param id room id
|
||||
*/
|
||||
private defaultSubtribe(id: any) {
|
||||
|
||||
console.log(id, this._dm);
|
||||
|
||||
|
||||
this.WsChatService.streamRoomMessages(id).then((subscription) => {
|
||||
const room = this.getRoomById(id);
|
||||
room.status.receive.message = true;
|
||||
console.log(subscription, "subscription");
|
||||
})
|
||||
|
||||
this.WsChatService.subStreamNotifyRoom(id, 'typing', false).then((subscription) => {
|
||||
const room = this.getRoomById(id);
|
||||
room.status.receive.typing = true;
|
||||
console.log(subscription, "subStreamNotifyRoom");
|
||||
//
|
||||
})
|
||||
|
||||
this.WsChatService.subStreamNotifyRoom(id, 'readMessage', false).then((subscription) => {
|
||||
const room = this.getRoomById(id);
|
||||
room.status.receive.readMessage = true;
|
||||
console.log(subscription, "subStreamNotifyRoom");
|
||||
// console.log(subscription, "subStreamNotifyRoom");
|
||||
//
|
||||
})
|
||||
|
||||
this.WsChatService.streamNotifyRoomDeleteMessage(id).then((subscription) => {
|
||||
const room = this.getRoomById(id);
|
||||
room.status.receive.deleteMessage = true;
|
||||
console.log(subscription);
|
||||
// console.log(subscription);
|
||||
//
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user