Tweaks discovered when using Compound overrides. (#4456)

- Fixes a bug where gradients wouldn't use the latest tokens after first use.
- Makes the bloom aware of colour overrides (and discovers a bug with dark mode).
- Decouples HomeScreenCell from the HomeScreenViewModel.Context (so it can be previewed with colour overrides).
This commit is contained in:
Doug
2025-09-02 09:40:03 +01:00
committed by GitHub
parent 40fb20bfb9
commit 441f5ae975
8 changed files with 50 additions and 36 deletions
@@ -67,17 +67,10 @@ struct ShimmerModifier: ViewModifier {
}
struct ShimmerOverlay_Previews: PreviewProvider, TestablePreview {
static let viewModel = HomeScreenViewModel(userSession: UserSessionMock(.init(clientProxy: ClientProxyMock(.init(userID: "")))),
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
appSettings: ServiceLocator.shared.settings,
analyticsService: ServiceLocator.shared.analytics,
notificationManager: NotificationManagerMock(),
userIndicatorController: ServiceLocator.shared.userIndicatorController)
static var previews: some View {
VStack(spacing: 0) {
ForEach(0...8, id: \.self) { _ in
HomeScreenRoomCell(room: .placeholder(), context: viewModel.context, isSelected: false)
HomeScreenRoomCell(room: .placeholder(), isSelected: false, mediaProvider: MediaProviderMock(configuration: .init())) { _ in }
}
}
.redacted(reason: .placeholder)