[eslint] refs #850 Fix indent spaces for NewToot

This commit is contained in:
AkiraFukushima 2019-04-11 00:24:34 +09:00
parent b9941e71c3
commit 21605412cf
2 changed files with 14 additions and 17 deletions

View File

@ -111,10 +111,11 @@ const actions: ActionTree<NewTootState, RootState> = {
rootState.TimelineSpace.account.accessToken,
rootState.TimelineSpace.account.baseURL + '/api/v1'
)
return Promise.all(
Object.keys(media).map(async id => {
const attachments = Object.keys(media).map(async id => {
return client.put<Attachment>(`/media/${id}`, { description: media[id] })
})).catch(err => {
})
return Promise.all(attachments)
.catch(err => {
console.error(err)
throw err
})

View File

@ -30,23 +30,19 @@ export const MUTATION_TYPES = {
const mutations: MutationTree<StatusState> = {
[MUTATION_TYPES.UPDATE_FILTERED_ACCOUNTS]: (state, accounts: Array<Account>) => {
state.filteredAccounts = accounts.map((a) => {
return {
state.filteredAccounts = accounts.map(a => ({
name: `@${a.acct}`,
image: null
}
})
}))
},
[MUTATION_TYPES.CLEAR_FILTERED_ACCOUNTS]: (state) => {
state.filteredAccounts = []
},
[MUTATION_TYPES.UPDATE_FILTERED_HASHTAGS]: (state, tags: Array<Tag>) => {
state.filteredHashtags = tags.map((t) => {
return {
state.filteredHashtags = tags.map(t => ({
name: `#${t}`,
image: null
}
})
}))
},
[MUTATION_TYPES.CLEAR_FILTERED_ACCOUNTS]: (state) => {
state.filteredHashtags = []