Fixed: pullRequest comments
This commit is contained in:
parent
108d996c99
commit
f64de731a8
|
|
@ -1,9 +1,23 @@
|
|||
//
|
||||
// CommonCrypto.h
|
||||
// CommonCrypto
|
||||
// Copyright (c) 2017 Touch Instinct
|
||||
//
|
||||
// Created by Alexey Gerasimov on 25/04/2017.
|
||||
// Copyright © 2017 TouchInstinct. All rights reserved.
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the Software), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,24 @@
|
|||
//
|
||||
// CommonCrypto.xcconfig
|
||||
// Chat
|
||||
// Copyright (c) 2017 Touch Instinct
|
||||
//
|
||||
// Created by Alexey Gerasimov on 17/08/16.
|
||||
// Copyright © 2016 Touch Instinct. All rights reserved.
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the Software), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
MODULEMAP_FILE[sdk=iphoneos*] = $(SRCROOT)/CommonCrypto/iphoneos.modulemap
|
||||
MODULEMAP_FILE[sdk=iphonesimulator*] = $(SRCROOT)/CommonCrypto/iphonesimulator.modulemap
|
||||
MODULEMAP_FILE[sdk=iphonesimulator*] = $(SRCROOT)/CommonCrypto/iphonesimulator.modulemap
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ public struct PassCodeConfiguration {
|
|||
}
|
||||
|
||||
public static var defaultConfiguration: PassCodeConfiguration {
|
||||
let passCodeConfiguration = PassCodeConfiguration()
|
||||
return passCodeConfiguration
|
||||
return PassCodeConfiguration()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,5 +23,5 @@
|
|||
public enum PassCodeError: Error {
|
||||
case codesNotMatch
|
||||
case wrongCode
|
||||
case tooMuchAttempts
|
||||
case tooManyAttempts
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ extension BasePassCodeViewModel {
|
|||
private var shouldUpdateControllerState: Bool {
|
||||
return !passCodeHolder.shouldValidate ||
|
||||
!(validationResultHolder.value?.isValid ?? true) ||
|
||||
validationResultHolder.value?.error == .tooMuchAttempts
|
||||
validationResultHolder.value?.error == .tooManyAttempts
|
||||
}
|
||||
|
||||
private func validateIfNeeded() {
|
||||
|
|
@ -158,7 +158,7 @@ extension BasePassCodeViewModel {
|
|||
|
||||
if (!validationResult.isValid && attemptsNumber == Int(passCodeConfiguration.maxAttemptsLoginNumber)) ||
|
||||
attemptsNumber > Int(passCodeConfiguration.maxAttemptsLoginNumber) {
|
||||
validationResult = .inValid(.tooMuchAttempts)
|
||||
validationResult = .inValid(.tooManyAttempts)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue