Date: Fri, 15 Nov 2019 12:52:29 -0500
Subject: show badge visibility user setting checkbox only if needed
---
src/components/user_settings/user_settings.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/components')
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index 8c18cf49..3f1982a6 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -104,7 +104,7 @@
{{ $t('settings.hide_followers_count_description') }}
-
+
{{ $t('settings.show_admin_badge') }}
--
cgit v1.2.3-70-g09d2
From 0995658757b89eeb38b78e997bec2d85b96296af Mon Sep 17 00:00:00 2001
From: kPherox
Date: Tue, 19 Nov 2019 14:07:15 +0000
Subject: backend interactor service: implement startFetchingFollowRequest
backend interactor service: remove unused fetchFollowRequests
---
src/components/nav_panel/nav_panel.js | 7 +------
src/components/side_drawer/side_drawer.js | 4 ++++
src/modules/api.js | 7 +++++++
src/modules/users.js | 1 +
.../backend_interactor_service/backend_interactor_service.js | 8 ++++++--
5 files changed, 19 insertions(+), 8 deletions(-)
(limited to 'src/components')
diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js
index aa3f7605..7f783acb 100644
--- a/src/components/nav_panel/nav_panel.js
+++ b/src/components/nav_panel/nav_panel.js
@@ -1,12 +1,7 @@
-import followRequestFetcher from '../../services/follow_request_fetcher/follow_request_fetcher.service'
-
const NavPanel = {
created () {
if (this.currentUser && this.currentUser.locked) {
- const store = this.$store
- const credentials = store.state.users.currentUser.credentials
-
- followRequestFetcher.startFetching({ store, credentials })
+ this.$store.dispatch('startFetchingFollowRequest')
}
},
computed: {
diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js
index 567d2e5e..0188cf3e 100644
--- a/src/components/side_drawer/side_drawer.js
+++ b/src/components/side_drawer/side_drawer.js
@@ -10,6 +10,10 @@ const SideDrawer = {
}),
created () {
this.closeGesture = GestureService.swipeGesture(GestureService.DIRECTION_LEFT, this.toggleDrawer)
+
+ if (this.currentUser && this.currentUser.locked) {
+ this.$store.dispatch('startFetchingFollowRequest')
+ }
},
components: { UserCard },
computed: {
diff --git a/src/modules/api.js b/src/modules/api.js
index eb6a7980..1293e3c8 100644
--- a/src/modules/api.js
+++ b/src/modules/api.js
@@ -43,6 +43,13 @@ const api = {
const fetcher = store.state.backendInteractor.startFetchingNotifications({ store })
store.commit('addFetcher', { fetcherName: 'notifications', fetcher })
},
+ startFetchingFollowRequest (store) {
+ // Don't start fetching if we already are.
+ if (store.state.fetchers['followRequest']) return
+
+ const fetcher = store.state.backendInteractor.startFetchingFollowRequest({ store })
+ store.commit('addFetcher', { fetcherName: 'followRequest', fetcher })
+ },
stopFetching (store, fetcherName) {
const fetcher = store.state.fetchers[fetcherName]
window.clearInterval(fetcher)
diff --git a/src/modules/users.js b/src/modules/users.js
index 1c9ff5e8..14b2d8b5 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -434,6 +434,7 @@ const users = {
store.dispatch('stopFetching', 'friends')
store.commit('setBackendInteractor', backendInteractorService(store.getters.getToken()))
store.dispatch('stopFetching', 'notifications')
+ store.dispatch('stopFetching', 'followRequest')
store.commit('clearNotifications')
store.commit('resetStatuses')
})
diff --git a/src/services/backend_interactor_service/backend_interactor_service.js b/src/services/backend_interactor_service/backend_interactor_service.js
index d6617276..c16bd1f1 100644
--- a/src/services/backend_interactor_service/backend_interactor_service.js
+++ b/src/services/backend_interactor_service/backend_interactor_service.js
@@ -1,6 +1,7 @@
import apiService from '../api/api.service.js'
import timelineFetcherService from '../timeline_fetcher/timeline_fetcher.service.js'
import notificationsFetcher from '../notifications_fetcher/notifications_fetcher.service.js'
+import followRequestFetcher from '../../services/follow_request_fetcher/follow_request_fetcher.service'
const backendInteractorService = credentials => {
const fetchStatus = ({ id }) => {
@@ -63,6 +64,10 @@ const backendInteractorService = credentials => {
return notificationsFetcher.startFetching({ store, credentials })
}
+ const startFetchingFollowRequest = ({ store }) => {
+ return followRequestFetcher.startFetching({ store, credentials })
+ }
+
// eslint-disable-next-line camelcase
const tagUser = ({ screen_name }, tag) => {
return apiService.tagUser({ screen_name, tag, credentials })
@@ -111,7 +116,6 @@ const backendInteractorService = credentials => {
const subscribeUser = (id) => apiService.subscribeUser({ credentials, id })
const unsubscribeUser = (id) => apiService.unsubscribeUser({ credentials, id })
const fetchBlocks = () => apiService.fetchBlocks({ credentials })
- const fetchFollowRequests = () => apiService.fetchFollowRequests({ credentials })
const fetchOAuthTokens = () => apiService.fetchOAuthTokens({ credentials })
const revokeOAuthToken = (id) => apiService.revokeOAuthToken({ id, credentials })
const fetchPinnedStatuses = (id) => apiService.fetchPinnedStatuses({ credentials, id })
@@ -168,6 +172,7 @@ const backendInteractorService = credentials => {
verifyCredentials: apiService.verifyCredentials,
startFetchingTimeline,
startFetchingNotifications,
+ startFetchingFollowRequest,
fetchMutes,
muteUser,
unmuteUser,
@@ -203,7 +208,6 @@ const backendInteractorService = credentials => {
mfaSetupOTP,
mfaConfirmOTP,
mfaDisableOTP,
- fetchFollowRequests,
approveUser,
denyUser,
vote,
--
cgit v1.2.3-70-g09d2
From 40e774e05abfce6da3c558c09ce1750c132a580f Mon Sep 17 00:00:00 2001
From: taehoon
Date: Mon, 25 Nov 2019 12:25:01 -0500
Subject: restore muted users collapsing logic on other user’s profiles
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/conversation/conversation.js | 3 ++-
src/components/conversation/conversation.vue | 1 +
src/components/status/status.js | 5 +++--
src/components/timeline/timeline.vue | 2 ++
4 files changed, 8 insertions(+), 3 deletions(-)
(limited to 'src/components')
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js
index 72ee9c39..08283fff 100644
--- a/src/components/conversation/conversation.js
+++ b/src/components/conversation/conversation.js
@@ -43,7 +43,8 @@ const conversation = {
'collapsable',
'isPage',
'pinnedStatusIdsObject',
- 'inProfile'
+ 'inProfile',
+ 'profileUserId'
],
created () {
if (this.isPage) {
diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue
index 0f1de55f..2e48240a 100644
--- a/src/components/conversation/conversation.vue
+++ b/src/components/conversation/conversation.vue
@@ -27,6 +27,7 @@
:highlight="getHighlight()"
:replies="getReplies(status.id)"
:in-profile="inProfile"
+ :profile-user-id="profileUserId"
class="status-fadein panel-body"
@goto="setHighlight"
@toggleExpanded="toggleExpanded"
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 714ea6d2..c49e729c 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -33,7 +33,8 @@ const Status = {
'noHeading',
'inlineExpanded',
'showPinned',
- 'inProfile'
+ 'inProfile',
+ 'profileUserId'
],
data () {
return {
@@ -115,7 +116,7 @@ const Status = {
return hits
},
- muted () { return !this.unmuted && ((!this.inProfile && this.status.user.muted) || (!this.inConversation && this.status.thread_muted) || this.muteWordHits.length > 0) },
+ muted () { return !this.unmuted && ((!(this.inProfile && this.status.user.id === this.profileUserId) && this.status.user.muted) || (!this.inConversation && this.status.thread_muted) || this.muteWordHits.length > 0) },
hideFilteredStatuses () {
return this.mergedConfig.hideFilteredStatuses
},
diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue
index f1d3903a..93f6f570 100644
--- a/src/components/timeline/timeline.vue
+++ b/src/components/timeline/timeline.vue
@@ -37,6 +37,7 @@
:collapsable="true"
:pinned-status-ids-object="pinnedStatusIdsObject"
:in-profile="inProfile"
+ :profile-user-id="userId"
/>
@@ -47,6 +48,7 @@
:status-id="status.id"
:collapsable="true"
:in-profile="inProfile"
+ :profile-user-id="userId"
/>