logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: 9ed445fff07f0b0315d7895a2fd3acf1be1bd529
parent: 7ee87c7618bfba986ec7a04581273629a1db9983
Author: lambadalambda <gitgud@rogerbraun.net>
Date:   Tue, 11 Apr 2017 06:03:02 -0400

Merge branch 'fix/daily-avg' into 'develop'

Fix daily average on accounts younger than a day

See merge request !69

Diffstat:

Msrc/components/user_card_content/user_card_content.vue5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue @@ -79,9 +79,8 @@ return this.$store.state.users.currentUser }, dailyAvg () { - return Math.round( - this.user.statuses_count / ((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000)) - ) + const days = Math.ceil((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000)) + return Math.round(this.user.statuses_count / days) } }, methods: {