mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user