update pinned feed from custom feed view

This commit is contained in:
Ansh Nanda 2023-05-22 20:07:40 -07:00
parent 8a2349c55f
commit 52a8879754
2 changed files with 48 additions and 14 deletions

View file

@ -129,8 +129,14 @@ export class SavedFeedsModel {
)
}
isPinned(feed: CustomFeedModel) {
return this.rootStore.preferences.pinnedFeeds.includes(feed.uri)
isPinned(feedOrUri: CustomFeedModel | string) {
let uri: string
if (typeof feedOrUri === 'string') {
uri = feedOrUri
} else {
uri = feedOrUri.uri
}
return this.rootStore.preferences.pinnedFeeds.includes(uri)
}
async movePinnedFeed(item: CustomFeedModel, direction: 'up' | 'down') {