Merge pull request #4268 from h3poteto/iss-4247

refs #4247 Fix response of reblog, fav, and bookmark
This commit is contained in:
AkiraFukushima 2023-04-09 00:49:10 +09:00 committed by GitHub
commit 859086e14b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 12 deletions

View File

@ -413,6 +413,7 @@ export default defineComponent({
}
await client.value.postStatus(form.status, options)
win.ipcRenderer.send('toot-action-sound')
clear()
} catch (err) {
console.error(err)

View File

@ -531,8 +531,8 @@ export default defineComponent({
if (message.reblogged) {
client.value
?.unreblogStatus(message.id)
.then(data => {
ctx.emit('update', data)
.then(res => {
ctx.emit('update', res.data)
})
.catch(err => {
console.error(err)
@ -544,8 +544,9 @@ export default defineComponent({
} else {
client.value
?.reblogStatus(message.id)
.then(data => {
ctx.emit('update', data)
.then(res => {
win.ipcRenderer.send('fav-rt-action-sound')
ctx.emit('update', res.data)
})
.catch(err => {
console.error(err)
@ -560,8 +561,8 @@ export default defineComponent({
if (message.favourited) {
client.value
?.unfavouriteStatus(message.id)
.then(data => {
ctx.emit('update', data)
.then(res => {
ctx.emit('update', res.data)
})
.catch(err => {
console.error(err)
@ -573,8 +574,9 @@ export default defineComponent({
} else {
client.value
?.favouriteStatus(message.id)
.then(data => {
ctx.emit('update', data)
.then(res => {
win.ipcRenderer.send('fav-rt-action-sound')
ctx.emit('update', res.data)
})
.catch(err => {
console.error(err)
@ -589,8 +591,8 @@ export default defineComponent({
if (message.bookmarked) {
client.value
?.unbookmarkStatus(message.id)
.then(data => {
ctx.emit('update', data)
.then(res => {
ctx.emit('update', res.data)
})
.catch(err => {
console.error(err)
@ -602,8 +604,9 @@ export default defineComponent({
} else {
client.value
?.bookmarkStatus(message.id)
.then(data => {
ctx.emit('update', data)
.then(res => {
win.ipcRenderer.send('fav-rt-action-sound')
ctx.emit('update', res.data)
})
.catch(err => {
console.error(err)