mirror of
https://git.notfire.cc/notfire/akkoma-fe.git
synced 2026-01-10 21:13:19 -08:00
add additional memo check for going to an already loaded user
This commit is contained in:
parent
693bd0c7a5
commit
a477547c80
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue