mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-05 07:27:42 +02:00
Address comments, show unencrypted rooms,
retain viewModel and services in ScreenSates so you can interact with Previews after the first state.
This commit is contained in:
@@ -19,12 +19,12 @@ import SwiftUI
|
||||
@available(iOS 14.0, *)
|
||||
struct ScreenList: View {
|
||||
|
||||
private var allStates: [MockScreenState]
|
||||
private var allKeys: [String]
|
||||
private var allStates: [ScreenStateInfo]
|
||||
|
||||
init(screens: [MockScreenState.Type]) {
|
||||
self.allStates = screens.flatMap{ $0.screenStates }
|
||||
self.allKeys = screens.flatMap{ $0.screenStateKeys }
|
||||
allStates = screens
|
||||
.map({ $0.stateRenderer })
|
||||
.flatMap{( $0.states )}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
@@ -32,9 +32,9 @@ struct ScreenList: View {
|
||||
List {
|
||||
ForEach(0..<allStates.count) { i in
|
||||
let state = allStates[i]
|
||||
NavigationLink(destination: state.screenView) {
|
||||
NavigationLink(destination: state.view) {
|
||||
Text(state.fullScreenTitle)
|
||||
.accessibilityIdentifier(allKeys[i])
|
||||
.accessibilityIdentifier(state.stateKey)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user