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: {
|
||||
folder_id: options.folder_id,
|
||||
},
|
||||
})
|
||||
}).then(({ data, ...rest }) => ({ ...rest, data: parseStatus(data) }))
|
||||
|
||||
export const unbookmarkStatus = ({ id, credentials }) =>
|
||||
promisedRequest({
|
||||
url: MASTODON_UNBOOKMARK_STATUS_URL(id),
|
||||
credentials,
|
||||
method: 'POST',
|
||||
})
|
||||
}).then(({ data, ...rest }) => ({ ...rest, data: parseStatus(data) }))
|
||||
|
||||
export const pinOwnStatus = ({ id, credentials }) =>
|
||||
promisedRequest({
|
||||
|
|
|
|||
|
|
@ -67,10 +67,10 @@ const EmojiReactions = {
|
|||
}
|
||||
},
|
||||
reactWith(emoji) {
|
||||
this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })
|
||||
useStatusesStore().reactWithEmoji(this.status.id, emoji)
|
||||
},
|
||||
unreact(emoji) {
|
||||
this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji })
|
||||
useStatusesStore().unreactWithEmoji(this.status.id, emoji)
|
||||
},
|
||||
async emojiOnClick(emoji) {
|
||||
if (!this.loggedIn) return
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { useInstanceStore } from 'src/stores/instance.js'
|
|||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useUsersStore } from 'src/stores/users.js'
|
||||
import { useStatusesStore } from 'src/stores/statuses.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -140,9 +141,9 @@ export default {
|
|||
(r) => r.name === emoji,
|
||||
)
|
||||
if (existingReaction?.me) {
|
||||
this.$store.dispatch('unreactWithEmoji', { id: this.status.id, emoji })
|
||||
useStatusesStore().unreactWithEmoji(this.status.id, emoji)
|
||||
} else {
|
||||
this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })
|
||||
useStatusesStore().reactWithEmoji(this.status.id, emoji)
|
||||
}
|
||||
},
|
||||
onShowEmojiPicker() {
|
||||
|
|
|
|||
|
|
@ -740,7 +740,6 @@ export const useUsersStore = defineStore('users', {
|
|||
dispatch('startFetchingFollowRequests')
|
||||
}
|
||||
|
||||
useStreamingStore().initSocket(true)
|
||||
if (useMergedConfigStore().mergedConfig.useStreamingApi) {
|
||||
useStreamingStore().initSocket(true)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue