1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-27 06:18:07 +09:00

TMP: feat: scroll to top after loading new items by . shortcut key but this is not working when showNewItems() takes time

This commit is contained in:
TAKAHASHI Shuuji 2024-04-23 23:49:14 +09:00
parent 8ad05dfd47
commit da3b134d18
No known key found for this signature in database
GPG Key ID: F15C887632129F5E

View File

@ -75,5 +75,8 @@ export default defineNuxtPlugin(({ $scrollToTop }) => {
?.querySelector<HTMLElement>('button#elk_show_new_items')
?.click()
}
whenever(logicAnd(isAuthenticated, notUsingInput, keys['.']), showNewItems)
whenever(logicAnd(isAuthenticated, notUsingInput, keys['.']), () => {
showNewItems()
;($scrollToTop as () => void)()
})
})