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
@@ -13,8 +13,13 @@ enum UserIndicatorType: Equatable {
|
||||
case toast(progress: UserIndicator.Progress?)
|
||||
case modal(progress: UserIndicator.Progress?, interactiveDismissDisabled: Bool, allowsInteraction: Bool)
|
||||
|
||||
static var toast: Self { .toast(progress: .none) }
|
||||
static var modal: Self { .modal(progress: .indeterminate, interactiveDismissDisabled: false, allowsInteraction: false) }
|
||||
static var toast: Self {
|
||||
.toast(progress: .none)
|
||||
}
|
||||
|
||||
static var modal: Self {
|
||||
.modal(progress: .indeterminate, interactiveDismissDisabled: false, allowsInteraction: false)
|
||||
}
|
||||
}
|
||||
|
||||
struct UserIndicator: Equatable, Identifiable {
|
||||
|
||||
@@ -76,28 +76,24 @@ struct UserIndicatorModalView_Previews: PreviewProvider, TestablePreview {
|
||||
VStack(spacing: 0) {
|
||||
UserIndicatorModalView(indicator: UserIndicator(type: .modal,
|
||||
title: "Successfully logged in",
|
||||
iconName: "checkmark")
|
||||
)
|
||||
iconName: "checkmark"))
|
||||
|
||||
UserIndicatorModalView(indicator: UserIndicator(type: .modal(progress: .published(CurrentValueSubject<Double, Never>(0.5).asCurrentValuePublisher()),
|
||||
interactiveDismissDisabled: false,
|
||||
allowsInteraction: false),
|
||||
title: "Successfully logged in",
|
||||
iconName: "checkmark")
|
||||
)
|
||||
iconName: "checkmark"))
|
||||
|
||||
UserIndicatorModalView(indicator: UserIndicator(type: .modal(progress: .none,
|
||||
interactiveDismissDisabled: false,
|
||||
allowsInteraction: false),
|
||||
title: "Successfully logged in",
|
||||
iconName: "checkmark")
|
||||
)
|
||||
iconName: "checkmark"))
|
||||
|
||||
UserIndicatorModalView(indicator: UserIndicator(type: .modal,
|
||||
title: "Successfully logged in",
|
||||
message: "You can now be happy.",
|
||||
iconName: "checkmark")
|
||||
)
|
||||
iconName: "checkmark"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ struct UserIndicatorPresenter: View {
|
||||
.animation(.elementDefault, value: userIndicatorController.activeIndicator)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private func indicatorViewFor(indicator: UserIndicator?) -> some View {
|
||||
ZStack { // Need a container to properly animate transitions
|
||||
if let indicator {
|
||||
|
||||
Reference in New Issue
Block a user