notification

This commit is contained in:
Peter Maquiran
2022-01-26 17:28:55 +01:00
parent 58a32f45d4
commit 66098ae4e8
5 changed files with 87 additions and 15 deletions
@@ -8,14 +8,13 @@ import { Rooms, Update as room } from 'src/app/models/chatMethod';
import { Storage } from '@ionic/storage';
import { Platform } from '@ionic/angular';
import { SqliteService } from 'src/app/services/sqlite.service';
import { NativeNotificationService } from 'src/app/services/native-notification.service';
@Injectable({
providedIn: 'root'
})
export class WsChatMethodsService {
dm: {[key: string]: RoomService} = {}
group: {[key: string]: RoomService} = {}
@@ -29,6 +28,7 @@ export class WsChatMethodsService {
private storage: Storage,
private platform: Platform,
private sqlservice: SqliteService,
private NativeNotificationService: NativeNotificationService
) {
(async()=>{
await this.getAllRooms();
@@ -48,10 +48,7 @@ export class WsChatMethodsService {
rooms.result.update.forEach((roomData: room) => {
let room:RoomService;
//console.log(roomData);
room = new RoomService(this.WsChatService, new MessageService(), this.storage, this.platform, this.sqlservice)
room = new RoomService(this.WsChatService, new MessageService(), this.storage, this.platform, this.sqlservice, this.NativeNotificationService)
room.setData({
customFields: roomData.customFields,
id: this.getRoomId(roomData),
@@ -73,8 +70,6 @@ export class WsChatMethodsService {
this.groupCount++
}
});
this.loadingWholeList = false