From ab99d5ef952998cfe277dfbb32dd9fe238c91f48 Mon Sep 17 00:00:00 2001 From: jasper Date: Tue, 26 Mar 2019 13:35:08 -0700 Subject: [PATCH 1/4] Fix warnings in user profile routing --- src/components/basic_user_card/basic_user_card.js | 1 + .../user_profile_link_generator.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/basic_user_card/basic_user_card.js b/src/components/basic_user_card/basic_user_card.js index 87085a28..a80e6cf0 100644 --- a/src/components/basic_user_card/basic_user_card.js +++ b/src/components/basic_user_card/basic_user_card.js @@ -20,6 +20,7 @@ const BasicUserCard = { this.userExpanded = !this.userExpanded }, userProfileLink (user) { + console.log('22222222222222222222222222222') return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames) } } diff --git a/src/services/user_profile_link_generator/user_profile_link_generator.js b/src/services/user_profile_link_generator/user_profile_link_generator.js index a214ca48..5b430328 100644 --- a/src/services/user_profile_link_generator/user_profile_link_generator.js +++ b/src/services/user_profile_link_generator/user_profile_link_generator.js @@ -3,8 +3,8 @@ import { includes } from 'lodash' const generateProfileLink = (id, screenName, restrictedNicknames) => { const complicated = (isExternal(screenName) || includes(restrictedNicknames, screenName)) return { - name: (complicated ? 'external-user-profile' : 'user-profile'), - params: (complicated ? { id } : { name: screenName }) + name: (!screenName || complicated ? 'external-user-profile' : 'user-profile'), + params: (!screenName || complicated ? { id } : { name: screenName }) } } From 26955af60be26cf7ecba5d9b6ae03c11e111c1a4 Mon Sep 17 00:00:00 2001 From: jasper Date: Tue, 26 Mar 2019 13:36:33 -0700 Subject: [PATCH 2/4] Remove console log --- src/components/basic_user_card/basic_user_card.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/basic_user_card/basic_user_card.js b/src/components/basic_user_card/basic_user_card.js index a80e6cf0..87085a28 100644 --- a/src/components/basic_user_card/basic_user_card.js +++ b/src/components/basic_user_card/basic_user_card.js @@ -20,7 +20,6 @@ const BasicUserCard = { this.userExpanded = !this.userExpanded }, userProfileLink (user) { - console.log('22222222222222222222222222222') return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames) } } From 8e4ddcb843e9ba6422ae1e053a84a7148031f995 Mon Sep 17 00:00:00 2001 From: Brenden Bice Date: Thu, 28 Mar 2019 13:20:09 -0400 Subject: [PATCH 3/4] update store according to retweeted status --- src/modules/statuses.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index a16342e0..95262183 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -363,6 +363,15 @@ export const mutations = { }, setRetweeted (state, { status, value }) { const newStatus = state.allStatusesObject[status.id] + + if (newStatus.repeated !== value) { + if (value) { + newStatus.repeat_num++ + } else { + newStatus.repeat_num-- + } + } + newStatus.repeated = value }, setDeleted (state, { status }) { From e6f9b1517b6a0b8e58c5d9c3552b70850f05c528 Mon Sep 17 00:00:00 2001 From: jasper Date: Thu, 28 Mar 2019 18:43:03 -0700 Subject: [PATCH 4/4] Fix: Change condition --- .../user_profile_link_generator.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/user_profile_link_generator/user_profile_link_generator.js b/src/services/user_profile_link_generator/user_profile_link_generator.js index 5b430328..16f1531d 100644 --- a/src/services/user_profile_link_generator/user_profile_link_generator.js +++ b/src/services/user_profile_link_generator/user_profile_link_generator.js @@ -1,10 +1,10 @@ import { includes } from 'lodash' const generateProfileLink = (id, screenName, restrictedNicknames) => { - const complicated = (isExternal(screenName) || includes(restrictedNicknames, screenName)) + const complicated = !screenName || (isExternal(screenName) || includes(restrictedNicknames, screenName)) return { - name: (!screenName || complicated ? 'external-user-profile' : 'user-profile'), - params: (!screenName || complicated ? { id } : { name: screenName }) + name: (complicated ? 'external-user-profile' : 'user-profile'), + params: (complicated ? { id } : { name: screenName }) } }