mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
fix preview tests broken by a swiftformat rule,
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
--disable consistentSwitchCaseSpacing
|
--disable consistentSwitchCaseSpacing
|
||||||
--disable docCommentsBeforeModifiers # throwing false positives in AuthenticationServiceProtocol on v0.58.0
|
--disable docCommentsBeforeModifiers # throwing false positives in AuthenticationServiceProtocol on v0.58.0
|
||||||
--disable emptyExtensions
|
--disable emptyExtensions
|
||||||
|
--disable redundantStateInit # this can break some preview tests
|
||||||
|
|
||||||
--commas inline
|
--commas inline
|
||||||
--ifdef no-indent
|
--ifdef no-indent
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ struct TimelineStyler<Content: View>: View {
|
|||||||
init(timelineItem: EventBasedTimelineItemProtocol, @ViewBuilder content: @escaping () -> Content) {
|
init(timelineItem: EventBasedTimelineItemProtocol, @ViewBuilder content: @escaping () -> Content) {
|
||||||
self.timelineItem = timelineItem
|
self.timelineItem = timelineItem
|
||||||
self.content = content
|
self.content = content
|
||||||
adjustedDeliveryStatus = timelineItem.properties.deliveryStatus
|
_adjustedDeliveryStatus = State(initialValue: timelineItem.properties.deliveryStatus)
|
||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ struct LiveLocationRoomTimelineView: View {
|
|||||||
init(currentDate: Date = .now, timelineItem: LiveLocationRoomTimelineItem, isStopped: Bool = false) {
|
init(currentDate: Date = .now, timelineItem: LiveLocationRoomTimelineItem, isStopped: Bool = false) {
|
||||||
self.currentDate = currentDate
|
self.currentDate = currentDate
|
||||||
self.timelineItem = timelineItem
|
self.timelineItem = timelineItem
|
||||||
hasExpired = isStopped || currentDate >= timelineItem.content.timeoutDate
|
_hasExpired = State(initialValue: isStopped || currentDate >= timelineItem.content.timeoutDate)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A publisher that fires once when the timeoutDate is reached, setting `hasExpired` to true.
|
/// A publisher that fires once when the timeoutDate is reached, setting `hasExpired` to true.
|
||||||
|
|||||||
Reference in New Issue
Block a user