Load more journal entries (#3048)

* Update the default number of journal entries shown

* Get 7 journal entries per load while infinite scrolling

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
This commit is contained in:
Jonah Goldsaito
2022-02-22 04:30:31 -05:00
committed by GitHub
parent 8c64e7ccda
commit cc0cdb40f2
4 changed files with 4 additions and 5 deletions

1
.gitignore vendored
View File

@@ -39,4 +39,3 @@ charlie/
docker
android/app/src/main/assets/capacitor.plugin.json
ios/App/App/capacitor.config.json
yarn.lock

View File

@@ -559,7 +559,7 @@
(defn load-more-journals!
[]
(when (has-more-journals?)
(state/update-state! :journals-length inc)))
(state/set-journals-length! (+ (:journals-length @state/state) 7))))
(defn update-public-attribute!
[page-name value]

View File

@@ -137,7 +137,7 @@
(defn go-to-journals!
[]
(state/set-journals-length! 1)
(state/set-journals-length! 3)
(let [route (if (state/custom-home-page?)
:all-journals
:home)]

View File

@@ -49,7 +49,7 @@
:draw? false
:db/restoring? nil
:journals-length 2
:journals-length 3
:search/q ""
:search/mode :global