ソースを参照

:fire: tweaking call so it uses getMore

tags/0.9.0
J 4年前
コミット
adb8cef0aa
1個のファイルの変更3行の追加4行の削除
  1. 3
    4
      vue-theme/src/pages/list.vue

+ 3
- 4
vue-theme/src/pages/list.vue ファイルの表示

@@ -71,7 +71,7 @@ export default {
71 71
             this.page++
72 72
             this.getPosts(false)
73 73
         },
74
-        async getPosts(clear) {
74
+        async getPosts({ clear }) {
75 75
             // Sorting
76 76
             let sort = this.sortBy
77 77
                 ? this.sortBy
@@ -164,9 +164,8 @@ export default {
164 164
             
165 165
             this.checkAndSetHero(this.type)
166 166
             
167
-            // TODO: Track last loaded page per post type
168
-            // Less http calls
169
-            this.getPosts(true)
167
+            // Load first page of results
168
+            this.getPosts({ clear: true })
170 169
 
171 170
             this.setIntersectionLoader()
172 171
         },

読み込み中…
キャンセル
保存