better handling of logged-out state
This commit is contained in:
parent
869e7cfe0f
commit
55f5ae6a6c
9 changed files with 17 additions and 15 deletions
|
|
@ -286,7 +286,7 @@ export const useStatusesStore = defineStore('statuses', {
|
|||
// repeats stats can be incorrect based on polling condition, let's update them using the most recent data
|
||||
newStatus.repeat_num = newStatus.rebloggedBy.length
|
||||
newStatus.repeated = !!newStatus.rebloggedBy.find(
|
||||
({ id }) => currentUser.id === id,
|
||||
({ id }) => currentUser?.id === id,
|
||||
)
|
||||
},
|
||||
addFavs({ id, favoritedByUsers }) {
|
||||
|
|
@ -296,7 +296,7 @@ export const useStatusesStore = defineStore('statuses', {
|
|||
// favorites stats can be incorrect based on polling condition, let's update them using the most recent data
|
||||
newStatus.fave_num = newStatus.favoritedBy.length
|
||||
newStatus.favorited = !!newStatus.favoritedBy.find(
|
||||
({ id }) => currentUser.id === id,
|
||||
({ id }) => currentUser?.id === id,
|
||||
)
|
||||
},
|
||||
addEmojiReactionsBy({ id, emojiReactions }) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue