mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Render the live location timeline item (#5209)
* created the data for the timeline item # Conflicts: # ElementX/Sources/Other/Logging/Tracing.swift # ElementX/Sources/Services/Authentication/AuthenticationService.swift # ElementX/Sources/Services/Authentication/LinkNewDeviceService.swift * Implemented the LLS timeline item * updated preview tests * pr and design suggestions * previewscrollview is debug only
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// Copyright 2026 Element Creations Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
#if DEBUG
|
||||
/// Only use in Previews! This useful scroll view allows you to still have a scroll view when previewing in Xcode
|
||||
/// but ignores it when running the tests, which allows you to still use it's content directly in preview tests
|
||||
/// and render the preview with `sizeThatFits` layout.
|
||||
struct PreviewScrollView<Content: View>: View {
|
||||
var content: () -> Content
|
||||
|
||||
var body: some View {
|
||||
if ProcessInfo.isRunningTests {
|
||||
content()
|
||||
} else {
|
||||
ScrollView {
|
||||
content()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user