@@ -81,6 +81,12 @@
@loadNext='loadNextPosts'
@loadPrevious='loadPreviousPosts'
>
+ <thread-post-placeholder
+ v-if='!posts.length'
+ v-for='n in 3'
+ :class='{"post--last": n === 2}'
+ ></thread-post-placeholder>
+
<thread-post-placeholder
v-if='$store.state.thread.loadingPosts === "previous"'
v-for='n in $store.state.thread.previousPostsCount'
@@ -101,6 +101,10 @@ const actions = {
})
},
loadInitialPostsAsync ({ state, commit, dispatch, rootState }, vue) {
+ commit('setPosts', [])
+ commit('setThread', { name: 'Loading...' })
+ dispatch('setTitle', 'Loading...')
let postNumber = vue.$route.params.post_number
let apiURL = '/api/v1/thread/' + vue.$route.params.id