Merge branch 'fixes' into 'main'
Make sure every relation of actor is loaded when operating on it Closes #1049, #1016 et #996 See merge request framasoft/mobilizon!1196
This commit is contained in:
@@ -259,17 +259,22 @@ export default class GroupSettings extends mixins(GroupMixin) {
|
||||
|
||||
@Watch("group")
|
||||
async watchUpdateGroup(oldGroup: IGroup, newGroup: IGroup): Promise<void> {
|
||||
if (
|
||||
oldGroup?.avatar !== undefined &&
|
||||
oldGroup?.avatar !== newGroup?.avatar
|
||||
) {
|
||||
this.avatarFile = await buildFileFromIMedia(this.group.avatar);
|
||||
}
|
||||
if (
|
||||
oldGroup?.banner !== undefined &&
|
||||
oldGroup?.banner !== newGroup?.banner
|
||||
) {
|
||||
this.bannerFile = await buildFileFromIMedia(this.group.banner);
|
||||
try {
|
||||
if (
|
||||
oldGroup?.avatar !== undefined &&
|
||||
oldGroup?.avatar !== newGroup?.avatar
|
||||
) {
|
||||
this.avatarFile = await buildFileFromIMedia(this.group.avatar);
|
||||
}
|
||||
if (
|
||||
oldGroup?.banner !== undefined &&
|
||||
oldGroup?.banner !== newGroup?.banner
|
||||
) {
|
||||
this.bannerFile = await buildFileFromIMedia(this.group.banner);
|
||||
}
|
||||
} catch (e) {
|
||||
// Catch errors while building media
|
||||
console.error(e);
|
||||
}
|
||||
this.editableGroup = { ...this.group };
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
</b-select>
|
||||
</b-field>
|
||||
<b-field
|
||||
v-if="config"
|
||||
expanded
|
||||
:label="$t('Category')"
|
||||
label-for="category"
|
||||
|
||||
Reference in New Issue
Block a user