fix: scroll down wrong detection

This commit is contained in:
Tienson Qin
2022-01-10 16:08:07 +08:00
parent 6ffb8d20ed
commit 906bd0234e
3 changed files with 27 additions and 18 deletions

View File

@@ -2930,13 +2930,16 @@
blocks->vec-tree)
bottom-reached (fn []
(reset! *last-idx idx)
(reset! ignore-scroll? false))]
(reset! ignore-scroll? false))
has-more? (>= (count flat-blocks) (inc idx))]
[:div#lazy-blocks
(ui/infinite-list
"main-content-container"
(block-list config segment)
{:on-load bottom-reached
:threhold 1000})]))
:threhold 1000
:has-more has-more?
:more-text "More"})]))
(rum/defcs blocks-container <
{:init (fn [state]