OPDS Fix (#737)
* 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:
parent
cbf095c3a1
commit
69246d80fb
2 changed files with 23 additions and 48 deletions
|
@ -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');
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue