Added actions to notifications state

This commit is contained in:
Giuseppe Digilio
2018-03-05 13:01:54 +01:00
parent cc615ac0bf
commit e1e7840ec7
3 changed files with 34 additions and 10 deletions

View File

@@ -24,12 +24,12 @@ export class NotificationsEffects {
* Authenticate user.
* @method authenticate
*/
@Effect()
/*@Effect()
public timer: Observable<Action> = this.actions$
.ofType(NotificationsActionTypes.NEW_NOTIFICATION_WITH_TIMER)
.debounceTime((action) => action.payload.options.timeOut)
.debounceTime((action) => action.payload.options.timeOut as number)
.map(() => new RemoveNotificationAction());
/* .switchMap((action: NewNotificationWithTimerAction) => Observable
.switchMap((action: NewNotificationWithTimerAction) => Observable
.timer(30000)
.mapTo(() => new RemoveNotificationAction())
);*/