Fixes #271 - Allow bubbles to horizontally fill the available space (#290)

* Fixes #271 - Allow bubbles to horizontally fill the available space
* Set the existing timelineItems on the timeline when appearing. This fixes UI tests in which items exists without the need for backpagination. It also presumably will fix the timeline when having cached data.
This commit is contained in:
Stefan Ceriu
2022-11-04 17:16:39 +02:00
committed by GitHub
parent 162830086f
commit fcd94fca31
8 changed files with 2 additions and 43 deletions
@@ -50,22 +50,3 @@ extension View {
environment(\.timelineStyle, style)
}
}
// MARK: - Timeline Width
private struct TimelineWidthKey: EnvironmentKey {
static let defaultValue: CGFloat = 0
}
extension EnvironmentValues {
var timelineWidth: CGFloat {
get { self[TimelineWidthKey.self] }
set { self[TimelineWidthKey.self] = newValue }
}
}
extension View {
func timelineWidth(_ width: CGFloat) -> some View {
environment(\.timelineWidth, width)
}
}