more interaction work
This commit is contained in:
parent
05e5f8e966
commit
02d934758b
4 changed files with 7 additions and 7 deletions
|
|
@ -143,14 +143,14 @@ export const bookmarkStatus = ({ id, credentials, ...options }) =>
|
||||||
payload: {
|
payload: {
|
||||||
folder_id: options.folder_id,
|
folder_id: options.folder_id,
|
||||||
},
|
},
|
||||||
})
|
}).then(({ data, ...rest }) => ({ ...rest, data: parseStatus(data) }))
|
||||||
|
|
||||||
export const unbookmarkStatus = ({ id, credentials }) =>
|
export const unbookmarkStatus = ({ id, credentials }) =>
|
||||||
promisedRequest({
|
promisedRequest({
|
||||||
url: MASTODON_UNBOOKMARK_STATUS_URL(id),
|
url: MASTODON_UNBOOKMARK_STATUS_URL(id),
|
||||||
credentials,
|
credentials,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
})
|
}).then(({ data, ...rest }) => ({ ...rest, data: parseStatus(data) }))
|
||||||
|
|
||||||
export const pinOwnStatus = ({ id, credentials }) =>
|
export const pinOwnStatus = ({ id, credentials }) =>
|
||||||
promisedRequest({
|
promisedRequest({
|
||||||
|
|
|
||||||
|
|
@ -67,10 +67,10 @@ const EmojiReactions = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
reactWith(emoji) {
|
reactWith(emoji) {
|
||||||
this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })
|
useStatusesStore().reactWithEmoji(this.status.id, emoji)
|
||||||
},
|
},
|
||||||
unreact(emoji) {
|
unreact(emoji) {
|
||||||
this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji })
|
useStatusesStore().unreactWithEmoji(this.status.id, emoji)
|
||||||
},
|
},
|
||||||
async emojiOnClick(emoji) {
|
async emojiOnClick(emoji) {
|
||||||
if (!this.loggedIn) return
|
if (!this.loggedIn) return
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||||
import { useUsersStore } from 'src/stores/users.js'
|
import { useUsersStore } from 'src/stores/users.js'
|
||||||
|
import { useStatusesStore } from 'src/stores/statuses.js'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import {
|
||||||
|
|
@ -140,9 +141,9 @@ export default {
|
||||||
(r) => r.name === emoji,
|
(r) => r.name === emoji,
|
||||||
)
|
)
|
||||||
if (existingReaction?.me) {
|
if (existingReaction?.me) {
|
||||||
this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji })
|
useStatusesStore().unreactWithEmoji(this.status.id, emoji)
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })
|
useStatusesStore().reactWithEmoji(this.status.id, emoji)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShowEmojiPicker() {
|
onShowEmojiPicker() {
|
||||||
|
|
|
||||||
|
|
@ -740,7 +740,6 @@ export const useUsersStore = defineStore('users', {
|
||||||
dispatch('startFetchingFollowRequests')
|
dispatch('startFetchingFollowRequests')
|
||||||
}
|
}
|
||||||
|
|
||||||
useStreamingStore().initSocket(true)
|
|
||||||
if (useMergedConfigStore().mergedConfig.useStreamingApi) {
|
if (useMergedConfigStore().mergedConfig.useStreamingApi) {
|
||||||
useStreamingStore().initSocket(true)
|
useStreamingStore().initSocket(true)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue