minor fix and renames
This commit is contained in:
parent
f8ef76811e
commit
3e59c61baf
3 changed files with 18 additions and 12 deletions
|
|
@ -136,7 +136,7 @@ const Status = {
|
|||
status() {
|
||||
return this.statusoid ?? useStatusesStore().allStatuses.get(this.statusId)
|
||||
},
|
||||
retweetedStatus() {
|
||||
repeatedStatus() {
|
||||
return useStatusesStore().allStatuses.get(this.status.retweeted_status.id)
|
||||
},
|
||||
repeater() {
|
||||
|
|
@ -167,7 +167,7 @@ const Status = {
|
|||
userClass() {
|
||||
return highlightClass(this.user)
|
||||
},
|
||||
deleted() {
|
||||
isDeleted() {
|
||||
return this.status.deleted
|
||||
},
|
||||
repeaterStyle() {
|
||||
|
|
@ -187,11 +187,13 @@ const Status = {
|
|||
const user = useUsersStore().findUser(
|
||||
this.mainStatus.in_reply_to_user_id,
|
||||
)
|
||||
// FIXME Why user not found sometimes???
|
||||
return user ? user.statusnet_profile_url : 'NOT_FOUND'
|
||||
|
||||
// User referenced in post might not be yet present in store
|
||||
// since their data is not included in status data
|
||||
return user?.statusnet_profile_url
|
||||
}
|
||||
},
|
||||
retweet() {
|
||||
isRepeat() {
|
||||
return !!this.status.retweeted_status
|
||||
},
|
||||
repeaterName() {
|
||||
|
|
@ -207,8 +209,8 @@ const Status = {
|
|||
)
|
||||
},
|
||||
mainStatus() {
|
||||
if (this.retweet) {
|
||||
return this.retweetedStatus
|
||||
if (this.isRepeat) {
|
||||
return this.repeatedStatus
|
||||
} else {
|
||||
return this.status
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<div class="status-container muted">
|
||||
<small class="status-username">
|
||||
<FAIcon
|
||||
v-if="muted && retweet"
|
||||
v-if="muted && isRepeat"
|
||||
class="fa-scale-110 fa-old-padding repeat-icon"
|
||||
icon="retweet"
|
||||
/>
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
</template>
|
||||
<template v-else>
|
||||
<div
|
||||
v-if="retweet && !noHeading && !inConversation"
|
||||
v-if="isRepeat && !noHeading && !inConversation"
|
||||
:class="[repeaterClass, { highlighted: repeaterStyle }]"
|
||||
:style="[repeaterStyle]"
|
||||
class="status-container repeat-info"
|
||||
|
|
@ -91,8 +91,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
v-if="!deleted"
|
||||
:class="[userClass, { highlighted: userStyle, '-repeat': retweet && !inConversation }]"
|
||||
v-if="!isDeleted"
|
||||
:class="[userClass, { highlighted: userStyle, '-repeat': isRepeat && !inConversation }]"
|
||||
:style="[ userStyle ]"
|
||||
class="status-container"
|
||||
:data-tags="tags"
|
||||
|
|
|
|||
|
|
@ -115,7 +115,6 @@ export const useStatusesStore = defineStore('statuses', {
|
|||
return addStatus(status)
|
||||
},
|
||||
retweet: (status) => {
|
||||
// RetweetedStatuses are never shown immediately
|
||||
if (status.retweeted_status) addStatus(status.retweeted_status)
|
||||
return addStatus(status)
|
||||
},
|
||||
|
|
@ -143,6 +142,11 @@ export const useStatusesStore = defineStore('statuses', {
|
|||
timestamp,
|
||||
})
|
||||
|
||||
const { in_reply_to_user_id } = status
|
||||
if (in_reply_to_user_id) {
|
||||
useUsersStore().fetchUserIfMissing({ id: in_reply_to_user_id })
|
||||
}
|
||||
|
||||
existing.user = user // reactive update in case we return old
|
||||
|
||||
// implicit: if oldTimestamp is undefined this will still be false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue