fix(ui): handle author adding when books are added (#1572)

This commit is contained in:
Alex
2026-05-29 13:07:16 +01:00
committed by GitHub
parent e138648dcf
commit 49a7593e42
5 changed files with 96 additions and 3 deletions
+3
View File
@@ -19,6 +19,7 @@ import {AuthService} from './shared/service/auth.service';
import {CommandPaletteComponent} from './features/command-palette/command-palette.component';
import {CommandPaletteService} from './features/command-palette/command-palette.service';
import {LibraryImportProgressService} from './shared/service/library-import-progress.service';
import {AuthorService} from './features/author-browser/service/author.service';
@Component({
selector: 'app-root',
@@ -37,6 +38,7 @@ export class AppComponent implements OnInit, OnDestroy {
private appConfigService = inject(AppConfigService); // DO NOT REMOVE: Used to initialize app config on startup
private authInit = inject(AuthInitializationService);
private bookService = inject(BookService);
private authorService = inject(AuthorService);
private rxStompService = inject(RxStompService);
private notificationEventService = inject(NotificationEventService);
private metadataProgressService = inject(MetadataProgressService);
@@ -109,6 +111,7 @@ export class AppComponent implements OnInit, OnDestroy {
const book = JSON.parse(msg.body);
this.libraryImportProgressService.recordBookAdded(book.metadata?.title || this.translocoService.translate('book.unknownTitle'));
this.bookService.handleNewlyCreatedBook(book);
this.authorService.handleNewlyCreatedBook(book);
})
);
this.subscriptions.push(