* Removed the Nothing here message when feeds are empty to conform to spec.

* Don't show toast on new series added when user is reading

* I forgot to add unique Ids to each feed, thus breaking Panels integration.
This commit is contained in:
Joseph Milazzo 2021-11-09 18:56:11 -06:00 committed by GitHub
parent cbf095c3a1
commit 69246d80fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 48 deletions

View file

@ -1,4 +1,5 @@
import { EventEmitter, Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { HubConnection, HubConnectionBuilder } from '@microsoft/signalr';
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { ToastrService } from 'ngx-toastr';
@ -49,7 +50,7 @@ export class MessageHubService {
isAdmin: boolean = false;
constructor(private modalService: NgbModal, private toastr: ToastrService) {
constructor(private modalService: NgbModal, private toastr: ToastrService, private router: Router) {
}
@ -111,7 +112,8 @@ export class MessageHubService {
payload: resp.body
});
this.seriesAdded.emit(resp.body);
if (this.isAdmin) {
// Don't show the toast when user has reader open
if (this.isAdmin && this.router.url.match(/\d+\/manga|book\/\d+/gi) !== null) {
this.toastr.info('Series ' + (resp.body as SeriesAddedEvent).seriesName + ' added');
}
});