Skip to content

Commit

Permalink
[Issue #260] Update LibraryNavigationTree to use the new reading list…
Browse files Browse the repository at this point in the history
… model.
  • Loading branch information
mcpierce committed Jun 21, 2020
1 parent 0949fb3 commit 88fe5aa
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -24,9 +24,9 @@ import { Subscription } from 'rxjs';
import { TranslateService } from '@ngx-translate/core';
import { ComicCollectionEntry } from 'app/library/models/comic-collection-entry';
import { NavigationDataPayload } from 'app/library/models/navigation-data-payload';
import { ReadingList } from 'app/library/models/reading-list/reading-list';
import { CollectionType } from 'app/library/models/collection-type.enum';
import { Router } from '@angular/router';
import { ReadingList } from 'app/comics/models/reading-list';

const PUBLISHER_NODE = 0;
const SERIES_NODE = 1;
Expand Down Expand Up @@ -168,7 +168,7 @@ export class LibraryNavigationTreeComponent implements OnInit, OnDestroy {
this.storiesSubscription = this.libraryAdaptor.stories$.subscribe(stories =>
this.createChildNodes(CollectionType.STORIES, STORY_NODE, stories)
);
this.readingListSubscription = this.readingListAdaptor.reading_list$.subscribe(
this.readingListSubscription = this.libraryAdaptor.readingLists$.subscribe(
lists => this.loadReadingLists(lists)
);
}
Expand Down Expand Up @@ -252,7 +252,7 @@ export class LibraryNavigationTreeComponent implements OnInit, OnDestroy {
'library-navigation-tree.label.reading-list',
{
name: list.name,
count: list.entries.length
count: list.comics.length
}
),
key: list.name,
Expand All @@ -262,7 +262,7 @@ export class LibraryNavigationTreeComponent implements OnInit, OnDestroy {
} as NavigationDataPayload,
icon: 'pi pi-list',
expanded: false,
selectable: list.entries.length > 0
selectable: list.comics.length > 0
} as TreeNode;
})
} as TreeNode;
Expand Down

0 comments on commit 88fe5aa

Please sign in to comment.