From 8ce513ed09124fa0183943c359950f49ebcf2f89 Mon Sep 17 00:00:00 2001 From: shpuld Date: Thu, 31 Jan 2019 21:11:28 +0200 Subject: initial draft for follows/following pagination --- src/components/user_profile/user_profile.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/components/user_profile/user_profile.js') diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 27e138b0..4f09c9e7 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -19,6 +19,12 @@ const UserProfile = { this.$store.dispatch('stopFetching', 'favorites') this.$store.dispatch('stopFetching', 'media') }, + data () { + return { + followsPage: 0, + followersPage: 0 + } + }, computed: { timeline () { return this.$store.state.statuses.timelines.user @@ -80,6 +86,11 @@ const UserProfile = { if (this.isUs) { this.$store.dispatch('startFetching', ['favorites', this.fetchBy]) } + }, + nextFollowsPage () { + this.followsPage += 1 + this.$store.dispatch('addFriends', { id: this.userId, page: this.followsPage }) + console.log(this.user.friends) } }, watch: { -- cgit v1.2.3-70-g09d2