diff --git a/src/app/services/chat/room.service.ts b/src/app/services/chat/room.service.ts index 5a1d6c6d2..4460386f4 100644 --- a/src/app/services/chat/room.service.ts +++ b/src/app/services/chat/room.service.ts @@ -3,6 +3,8 @@ import { WsChatService } from 'src/app/services/chat/ws-chat.service'; import { MessageService } from 'src/app/services/chat/message.service' import { ChatUserService } from 'src/app/services/chat/chat-user.service' import { showDateDuration } from 'src/plugin/showDateDuration' +import { ToastsService } from '../toast.service'; + @Injectable({ providedIn: 'root' }) @@ -18,6 +20,7 @@ export class RoomService { private hasLoadHistory = false duration = '' + ToastService = ToastsService constructor( public WsChatService: WsChatService, @@ -43,7 +46,7 @@ export class RoomService { message.setData(Chatmessage.result) this.massages.push(message) this.calDateDuration(Chatmessage.result._updatedAt) - + this.ToastService.presentToast('nova mensagem') } ) } diff --git a/src/app/services/toast.service.ts b/src/app/services/toast.service.ts index 840678e37..352bd86a3 100644 --- a/src/app/services/toast.service.ts +++ b/src/app/services/toast.service.ts @@ -10,9 +10,7 @@ export class ToastService { constructor( public toastController: ToastController, - private animationController: AnimationController, - private modalController: ModalController, - ) { } + ) { } ngOnInit() {} @@ -230,3 +228,6 @@ export class ToastService { } } + + +export const ToastsService = new ToastService(new ToastController()) \ No newline at end of file