mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Update files following swiftformat upgrade
This commit is contained in:
committed by
Stefan Ceriu
parent
fe189fcfed
commit
23062901c0
@@ -46,7 +46,6 @@ struct PinnedItemsBannerView: View {
|
||||
.accessibilityElement(children: .contain)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var viewAllButton: some View {
|
||||
Button { onViewAllButtonTap() } label: {
|
||||
Text(state.isLoading ? "" : L10n.screenRoomPinnedBannerViewAllButtonTitle)
|
||||
|
||||
@@ -72,14 +72,12 @@ struct RoomScreen: View {
|
||||
.sentryTrace("\(Self.self)")
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var pinnedItemsBanner: some View {
|
||||
PinnedItemsBannerView(state: context.viewState.pinnedEventsBannerState,
|
||||
onMainButtonTap: { context.send(viewAction: .tappedPinnedEventsBanner) },
|
||||
onViewAllButtonTap: { context.send(viewAction: .viewAllPins) })
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var knockRequestsBanner: some View {
|
||||
KnockRequestsBannerView(requests: context.viewState.displayedKnockRequests,
|
||||
onDismiss: dismissKnockRequestsBanner,
|
||||
|
||||
@@ -49,7 +49,6 @@ struct SwipeRightAction<Label: View>: ViewModifier {
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private func mainContent(content: Content) -> some View {
|
||||
content
|
||||
.offset(x: xOffset, y: 0.0)
|
||||
@@ -164,7 +163,9 @@ extension View {
|
||||
}
|
||||
|
||||
struct SwipeRightAction_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View { Preview() }
|
||||
static var previews: some View {
|
||||
Preview()
|
||||
}
|
||||
|
||||
struct Preview: View {
|
||||
@State private var isPresentingSheet = false
|
||||
@@ -196,12 +197,14 @@ struct SwipeRightAction_Previews: PreviewProvider, TestablePreview {
|
||||
}
|
||||
}
|
||||
|
||||
// Fixes the issue on iOS 18 where DragGesture conflicts with the scroll view
|
||||
// https://github.com/feedback-assistant/reports/issues/542#issuecomment-2581322968
|
||||
/// Fixes the issue on iOS 18 where DragGesture conflicts with the scroll view
|
||||
/// https://github.com/feedback-assistant/reports/issues/542#issuecomment-2581322968
|
||||
private struct PanGestureRepresentable: UIGestureRecognizerRepresentable {
|
||||
var handle: (UIPanGestureRecognizer) -> Void
|
||||
|
||||
func makeCoordinator(converter: CoordinateSpaceConverter) -> Coordinator { .init() }
|
||||
func makeCoordinator(converter: CoordinateSpaceConverter) -> Coordinator {
|
||||
.init()
|
||||
}
|
||||
|
||||
func makeUIGestureRecognizer(context: Context) -> UIPanGestureRecognizer {
|
||||
let gesture = UIPanGestureRecognizer()
|
||||
|
||||
Reference in New Issue
Block a user