mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Stash the current filter so when we pop we can return to it
This commit is contained in:
parent
36e7a0378d
commit
6362e00a71
2 changed files with 10 additions and 1 deletions
|
|
@ -541,6 +541,7 @@ export function HomeFeedContainer(): JSX.Element {
|
|||
}
|
||||
const href = `${window.location.pathname}?${qp.toString()}`
|
||||
router.push(href, href, { shallow: true })
|
||||
window.sessionStorage.setItem('q', qp.toString())
|
||||
performActionOnItem('refresh', undefined as unknown as any)
|
||||
}}
|
||||
loadMore={() => {
|
||||
|
|
|
|||
|
|
@ -208,7 +208,15 @@ export default function Home(): JSX.Element {
|
|||
section: 'Article',
|
||||
name: 'Return to library',
|
||||
shortcut: ['u'],
|
||||
perform: () => router.push(`/home`),
|
||||
perform: () => {
|
||||
const query = window.sessionStorage.getItem('q')
|
||||
if (query) {
|
||||
router.push(`/home?${query}`)
|
||||
return
|
||||
} else {
|
||||
router.push(`/home`)
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'archive',
|
||||
|
|
|
|||
Loading…
Reference in a new issue