mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-31 01:27:26 +01:00
Merge pull request #784 from amyspark/prevent-multiple-toots
Prevent multiple toot submissions
This commit is contained in:
commit
2bbb607c54
@ -95,6 +95,10 @@ const NewToot = {
|
||||
if (rootState.TimelineSpace.account.accessToken === undefined || rootState.TimelineSpace.account.accessToken === null) {
|
||||
throw new AuthenticationError()
|
||||
}
|
||||
if (state.blockSubmit) {
|
||||
return
|
||||
}
|
||||
commit('changeBlockSubmit', true)
|
||||
const client = new Mastodon(
|
||||
rootState.TimelineSpace.account.accessToken,
|
||||
rootState.TimelineSpace.account.baseURL + '/api/v1'
|
||||
@ -104,6 +108,9 @@ const NewToot = {
|
||||
ipcRenderer.send('toot-action-sound')
|
||||
return res.data
|
||||
})
|
||||
.finally(() => {
|
||||
commit('changeBlockSubmit', false)
|
||||
})
|
||||
},
|
||||
openReply ({ dispatch, commit, rootState }, message) {
|
||||
commit('setReplyTo', message)
|
||||
|
Loading…
x
Reference in New Issue
Block a user