fix typo
This commit is contained in:
parent
3c4fc074ef
commit
8c76056747
|
@ -1,5 +1,5 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { NotificationService, NotificatioData } from '../../services/notification.service';
|
||||
import { NotificationService, NotificationData } from '../../services/notification.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-notification-hub',
|
||||
|
@ -12,7 +12,7 @@ export class NotificationHubComponent implements OnInit {
|
|||
constructor(private notificationService: NotificationService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.notificationService.notifactionStream.subscribe((notification: NotificatioData) => {
|
||||
this.notificationService.notifactionStream.subscribe((notification: NotificationData) => {
|
||||
let alreadyExistingNotification = this.notifications.find(x => x.avatar === notification.avatar && x.message === notification.message);
|
||||
|
||||
if(alreadyExistingNotification){
|
||||
|
@ -40,13 +40,13 @@ export class NotificationHubComponent implements OnInit {
|
|||
// }, 1500);
|
||||
// }
|
||||
|
||||
onClick(notification: NotificatioData): void{
|
||||
onClick(notification: NotificationData): void{
|
||||
this.notifications = this.notifications.filter(x => x.id !== notification.id);
|
||||
}
|
||||
}
|
||||
|
||||
class NotificationWrapper extends NotificatioData {
|
||||
constructor(data: NotificatioData) {
|
||||
class NotificationWrapper extends NotificationData {
|
||||
constructor(data: NotificationData) {
|
||||
super(data.avatar, data.errorCode, data.message, data.isError);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { ToolsService } from './tools.service';
|
|||
@Injectable()
|
||||
export class NotificationService {
|
||||
public restartNotificationStream = new Subject<string>();
|
||||
public notifactionStream = new Subject<NotificatioData>();
|
||||
public notifactionStream = new Subject<NotificationData>();
|
||||
public newRespondPostedStream = new Subject<NewReplyData>();
|
||||
public hideAccountUrlStream = new Subject<string>();
|
||||
public deletedStatusStream = new Subject<StatusWrapper>();
|
||||
|
@ -19,7 +19,7 @@ export class NotificationService {
|
|||
}
|
||||
|
||||
public notify(avatar: string, errorCode: number, message: string, isError: boolean) {
|
||||
let newNotification = new NotificatioData(avatar, errorCode, message, isError);
|
||||
let newNotification = new NotificationData(avatar, errorCode, message, isError);
|
||||
this.notifactionStream.next(newNotification);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ export class NotificationService {
|
|||
}
|
||||
}
|
||||
|
||||
export class NotificatioData {
|
||||
export class NotificationData {
|
||||
public id: string;
|
||||
|
||||
constructor(
|
||||
|
|
Loading…
Reference in New Issue