scroll scroll scroll
This commit is contained in:
parent
ad8519e0f3
commit
45213f07c6
8 changed files with 230 additions and 107 deletions
|
|
@ -1,14 +1,16 @@
|
|||
import { computed, toValue } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
|
||||
import { useStatusesStore } from 'src/stores/statuses.js'
|
||||
|
||||
export function useMainStatus(statusId) {
|
||||
const getStatusObject = (id) => useStatusesStore().allStatuses.get(id)
|
||||
const statusesStore = storeToRefs(useStatusesStore())
|
||||
const getStatusObject = (id) => statusesStore.allStatuses.value.get(id)
|
||||
|
||||
const status = computed(() => getStatusObject(toValue(statusId)))
|
||||
const status = computed(() => getStatusObject(statusId.value))
|
||||
|
||||
const mainStatus = computed(() => {
|
||||
if (!status.value) return
|
||||
if (!status.value) return null
|
||||
const retweetedStatusId = status.value.retweeted_status?.id
|
||||
if (retweetedStatusId) {
|
||||
return getStatusObject(retweetedStatusId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue