add additional memo check for going to an already loaded user

This commit is contained in:
notfire 2026-01-04 15:14:19 -05:00
commit a477547c80
No known key found for this signature in database

View file

@ -145,13 +145,19 @@ const UserProfile = {
if (user) {
loadById(user.id)
this.note = user?.relationship?.note
if (this.note === undefined) {
this.$store.dispatch('fetchUserRelationshipNote', user.id)
.then((resp) => {
this.note = resp
})
}
this.$store.dispatch('setDisplayBackground', user.background_image)
} else {
this.$store.dispatch('fetchUser', userNameOrId)
.then(({ id, relationship, background_image }) => {
this.note = relationship?.note
if (this.note === undefined) {
this.$store.dispatch('fetchUserRelationshipNote', userNameOrId)
this.$store.dispatch('fetchUserRelationshipNote', user.id)
.then((resp) => {
this.note = resp
})