refactor: move bookmarks entry location
This commit is contained in:
parent
a847c4dc56
commit
5c2a016d4b
13 changed files with 95 additions and 69 deletions
|
|
@ -69,10 +69,6 @@ export function FeedProvider({ children }: { children: React.ReactNode }) {
|
|||
if (feedInfo.feedType === 'following' && pubkey) {
|
||||
return await switchFeed('following', { pubkey })
|
||||
}
|
||||
|
||||
if (feedInfo.feedType === 'bookmarks' && pubkey) {
|
||||
return await switchFeed('bookmarks', { pubkey })
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
|
|
@ -147,21 +143,6 @@ export function FeedProvider({ children }: { children: React.ReactNode }) {
|
|||
setIsReady(true)
|
||||
return
|
||||
}
|
||||
if (feedType === 'bookmarks') {
|
||||
if (!options.pubkey) {
|
||||
setIsReady(true)
|
||||
return
|
||||
}
|
||||
|
||||
const newFeedInfo = { feedType }
|
||||
setFeedInfo(newFeedInfo)
|
||||
feedInfoRef.current = newFeedInfo
|
||||
storage.setFeedInfo(newFeedInfo, pubkey)
|
||||
|
||||
setRelayUrls([])
|
||||
setIsReady(true)
|
||||
return
|
||||
}
|
||||
setIsReady(true)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue