[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.accessToken,
rootState.TimelineSpace.account.baseURL + '/api/v1' rootState.TimelineSpace.account.baseURL + '/api/v1'
) )
return Promise.all( const attachments = Object.keys(media).map(async id => {
Object.keys(media).map(async id => {
return client.put<Attachment>(`/media/${id}`, { description: media[id] }) return client.put<Attachment>(`/media/${id}`, { description: media[id] })
})).catch(err => { })
return Promise.all(attachments)
.catch(err => {
console.error(err) console.error(err)
throw err throw err
}) })

View File

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