mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Update files following swiftformat upgrade
This commit is contained in:
committed by
Stefan Ceriu
parent
fe189fcfed
commit
23062901c0
@@ -27,9 +27,15 @@ struct AppLockScreenViewState: BindableState {
|
||||
var bindings: AppLockScreenViewStateBindings
|
||||
|
||||
/// The number of digits the user has entered so far.
|
||||
var numberOfDigitsEntered: Int { bindings.pinCode.count }
|
||||
var numberOfDigitsEntered: Int {
|
||||
bindings.pinCode.count
|
||||
}
|
||||
|
||||
/// Whether the subtitle is in a warning state or not.
|
||||
var isSubtitleWarning: Bool { numberOfPINAttempts > 0 }
|
||||
var isSubtitleWarning: Bool {
|
||||
numberOfPINAttempts > 0
|
||||
}
|
||||
|
||||
/// The string shown in the screen's subtitle.
|
||||
var subtitle: String {
|
||||
if !isSubtitleWarning {
|
||||
|
||||
@@ -78,7 +78,7 @@ struct AppLockScreen: View {
|
||||
/// The row of dots showing how many digits have been entered.
|
||||
var pinInputField: some View {
|
||||
HStack(spacing: 24) {
|
||||
/// The size of each dot within the PIN input field.
|
||||
// The size of each dot within the PIN input field.
|
||||
let pinDotSize: CGFloat = 14
|
||||
Circle()
|
||||
.fill(context.viewState.numberOfDigitsEntered > 0 ? .compound.iconPrimary : .compound.bgSubtlePrimary)
|
||||
|
||||
@@ -117,7 +117,9 @@ struct AppLockScreenPINKeypad_Previews: PreviewProvider {
|
||||
@StateObject var model = PreviewModel()
|
||||
class PreviewModel: ObservableObject {
|
||||
@Published var pinCode = ""
|
||||
var output: String { pinCode.isEmpty ? "Enter code" : pinCode }
|
||||
var output: String {
|
||||
pinCode.isEmpty ? "Enter code" : pinCode
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
|
||||
Reference in New Issue
Block a user