Room list: add custom section creation in SC (#33138)
* feat: add way to create custom section in SC * feat: disable custom section in vms * chore: include design tokens icons in vitest config * test: update screenshot * chore: use one react import
This commit is contained in:
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
@@ -199,8 +199,11 @@ export class RoomListHeaderViewModel
|
||||
SettingsStore.setValue("RoomList.showMessagePreview", null, SettingLevel.DEVICE, isMessagePreviewEnabled);
|
||||
this.snapshot.merge({ isMessagePreviewEnabled });
|
||||
};
|
||||
}
|
||||
|
||||
public createSection = (): void => {
|
||||
// To be implemented when custom section creation is added in vms
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Get the initial snapshot for the RoomListHeaderViewModel.
|
||||
* @param spaceStore - The space store instance.
|
||||
@@ -280,5 +283,8 @@ function computeHeaderSpaceState(
|
||||
displaySpaceMenu,
|
||||
canInviteInSpace,
|
||||
canAccessSpaceSettings,
|
||||
// To be implemented when custom section creation is added in vms
|
||||
canCreateSection: false,
|
||||
useComposeIcon: true,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -303,6 +303,8 @@ export class RoomListItemViewModel
|
||||
canMarkAsRead,
|
||||
canMarkAsUnread,
|
||||
roomNotifState,
|
||||
// To be implemented when custom section creation is added in vms
|
||||
canMoveToSection: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -381,4 +383,8 @@ export class RoomListItemViewModel
|
||||
const echoChamber = EchoChamber.forRoom(this.props.room);
|
||||
echoChamber.notificationVolume = elementNotifState;
|
||||
};
|
||||
|
||||
public onCreateSection = (): void => {
|
||||
// To be implemented when custom section creation is added in vms
|
||||
};
|
||||
}
|
||||
|
||||
@@ -572,6 +572,12 @@ export class RoomListViewModel
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
public closeToast: () => void = () => {
|
||||
this.snapshot.merge({
|
||||
toast: undefined,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user