Merge pull request #570 from h3poteto/fix/reply
Fix reply visibility level
This commit is contained in:
commit
0b61529d61
|
@ -41,19 +41,6 @@ const NewToot = {
|
|||
removeMedia (state, media) {
|
||||
state.attachedMedias = state.attachedMedias.filter(m => m.id !== media.id)
|
||||
},
|
||||
/**
|
||||
* changeVisibility
|
||||
* Update visibility using Visibility constants
|
||||
* @param state vuex state object
|
||||
* @param level Visibility level
|
||||
**/
|
||||
changeVisibility (state, level) {
|
||||
Object.keys(Visibility).map((key, index) => {
|
||||
if (Visibility[key].key === level) {
|
||||
this.visibility = Visibility[key].value
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* changeVisibilityValue
|
||||
* Update visibility using direct value
|
||||
|
@ -95,7 +82,14 @@ const NewToot = {
|
|||
.filter((a) => a !== rootState.TimelineSpace.account.username)
|
||||
commit('changeModal', true)
|
||||
commit('updateStatus', `${mentionAccounts.map(m => `@${m}`).join(' ')} `)
|
||||
commit('changeVisibility', message.visibility)
|
||||
let value = Visibility.Public.value
|
||||
Object.keys(Visibility).map((key, index) => {
|
||||
const target = Visibility[key]
|
||||
if (target.key === message.visibility) {
|
||||
value = target.value
|
||||
}
|
||||
})
|
||||
commit('changeVisibilityValue', value)
|
||||
},
|
||||
openModal ({ dispatch, commit, rootState }) {
|
||||
commit('changeModal', true)
|
||||
|
@ -109,7 +103,7 @@ const NewToot = {
|
|||
commit('clearAttachedMedias')
|
||||
commit('changeSensitive', false)
|
||||
commit('updateSpoiler', '')
|
||||
commit('changeVisibility', Visibility.Public)
|
||||
commit('changeVisibilityValue', Visibility.Public.value)
|
||||
},
|
||||
uploadImage ({ state, commit, rootState }, image) {
|
||||
commit('changeBlockSubmit', true)
|
||||
|
|
Loading…
Reference in New Issue