fixes for missing/incorrect avatar fallbacks
This commit is contained in:
parent
a50ea7f278
commit
3d84c6eea1
3 changed files with 6 additions and 6 deletions
|
|
@ -175,14 +175,14 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
|
|||
if (source === 'name') return
|
||||
if (INSTANCE_IDENTIY_EXTERNAL.has(source)) return
|
||||
useInstanceStore().set({
|
||||
value: config[source],
|
||||
value: config[source] ?? INSTANCE_IDENTITY_DEFAULT_DEFINITIONS[source].default,
|
||||
path: `instanceIdentity.${source}`,
|
||||
})
|
||||
})
|
||||
|
||||
Object.keys(INSTANCE_DEFAULT_CONFIG_DEFINITIONS).forEach((source) =>
|
||||
useInstanceStore().set({
|
||||
value: config[source],
|
||||
value: config[source] ?? INSTANCE_DEFAULT_CONFIG_DEFINITIONS[source].default,
|
||||
path: `prefsStorage.${source}`,
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ export default {
|
|||
)
|
||||
},
|
||||
isDefaultAvatar() {
|
||||
const baseAvatar = useInstanceStore().defaultAvatar
|
||||
const baseAvatar = useInstanceStore().instanceIdenitity.defaultAvatar
|
||||
return (
|
||||
!this.$store.state.users.currentUser.profile_image_url ||
|
||||
this.$store.state.users.currentUser.profile_image_url.includes(
|
||||
|
|
@ -371,7 +371,7 @@ export default {
|
|||
)
|
||||
},
|
||||
isDefaultBanner() {
|
||||
const baseBanner = useInstanceStore().defaultBanner
|
||||
const baseBanner = useInstanceStore().instanceIdentity.defaultBanner
|
||||
return (
|
||||
!this.$store.state.users.currentUser.cover_photo ||
|
||||
this.$store.state.users.currentUser.cover_photo.includes(baseBanner)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ function showWhoToFollow(panel, reply) {
|
|||
|
||||
panel.usersToFollow.forEach((toFollow, index) => {
|
||||
const user = shuffled[index]
|
||||
const img = user.avatar || useInstanceStore().defaultAvatar
|
||||
const img = user.avatar || useInstanceStore().instanceIdentity.defaultAvatar
|
||||
const name = user.acct
|
||||
|
||||
toFollow.img = img
|
||||
|
|
@ -71,7 +71,7 @@ const WhoToFollowPanel = {
|
|||
},
|
||||
mounted: function () {
|
||||
this.usersToFollow = new Array(3).fill().map(() => ({
|
||||
img: useInstanceStore().defaultAvatar,
|
||||
img: useInstanceStore().instanceIdentity.defaultAvatar,
|
||||
name: '',
|
||||
id: 0,
|
||||
}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue