Usability improvements to feeds

This commit is contained in:
Paul Frazee 2023-05-17 21:23:32 -05:00
parent f0003d1931
commit 6bf8e72157
8 changed files with 120 additions and 142 deletions

View file

@ -61,24 +61,24 @@ export class SavedFeedsModel {
return this.hasLoaded && !this.hasContent
}
get numOfFeeds() {
get numFeeds() {
return this.feeds.length
}
get listOfFeedNames() {
return this.feeds.map(f => f.displayName)
}
get listOfPinnedFeedNames() {
return this.pinned.map(f => f.displayName)
}
get savedFeedsWithoutPinned() {
get unpinned() {
return this.feeds.filter(
f => !this.pinned.find(p => p.data.uri === f.data.uri),
)
}
get feedNames() {
return this.feeds.map(f => f.displayName)
}
get pinnedFeedNames() {
return this.pinned.map(f => f.displayName)
}
togglePinnedFeed(feed: CustomFeedModel) {
if (!this.isPinned(feed)) {
this.pinned.push(feed)
@ -92,7 +92,7 @@ export class SavedFeedsModel {
}
reorderPinnedFeeds(temp: CustomFeedModel[]) {
this.pinned = temp
this.pinned = temp.filter(item => this.isPinned(item))
}
isPinned(feed: CustomFeedModel) {