Remove old muting logic
This commit is contained in:
parent
a6ce191cbc
commit
302310a653
5 changed files with 12 additions and 35 deletions
|
@ -110,11 +110,11 @@ export const mutations = {
|
|||
},
|
||||
muteUser (state, id) {
|
||||
const user = state.usersObject[id]
|
||||
set(user, 'mastodonMuted', true)
|
||||
set(user, 'muted', true)
|
||||
},
|
||||
unmuteUser (state, id) {
|
||||
const user = state.usersObject[id]
|
||||
set(user, 'mastodonMuted', false)
|
||||
set(user, 'muted', false)
|
||||
},
|
||||
setUserForStatus (state, status) {
|
||||
status.user = state.usersObject[status.user.id]
|
||||
|
@ -206,9 +206,10 @@ const users = {
|
|||
return Promise.all(promises)
|
||||
})
|
||||
.then((mutedUsers) => {
|
||||
each(mutedUsers, (user) => { user.mastodonMuted = true })
|
||||
each(mutedUsers, (user) => { user.muted = true })
|
||||
store.commit('addNewUsers', mutedUsers)
|
||||
store.commit('saveMutes', map(mutedUsers, 'id'))
|
||||
// TODO: Unset muted property of the rest users
|
||||
})
|
||||
},
|
||||
muteUser (store, id) {
|
||||
|
@ -368,6 +369,11 @@ const users = {
|
|||
// Start getting fresh posts.
|
||||
store.dispatch('startFetching', { timeline: 'friends' })
|
||||
|
||||
// Fetch mutes
|
||||
// TODO: We should not show timeline until fetchMutes is resolved
|
||||
// However, we can get rid of this logic totally if we can know user muted state from user object
|
||||
store.dispatch('fetchMutes')
|
||||
|
||||
// Fetch our friends
|
||||
store.rootState.api.backendInteractor.fetchFriends({ id: user.id })
|
||||
.then((friends) => commit('addNewUsers', friends))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue