static fixes
This commit is contained in:
parent
bf045ba8e2
commit
2efd0a5b29
|
|
@ -36,7 +36,7 @@ dependencies {
|
|||
exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
|
||||
}
|
||||
|
||||
provided 'com.facebook.fresco:fresco:1.2.0'
|
||||
provided 'com.facebook.fresco:fresco:1.3.0'
|
||||
provided 'com.bluelinelabs:logansquare:1.3.7'
|
||||
|
||||
provided 'com.scottyab:aes-crypto:0.0.4'
|
||||
|
|
|
|||
|
|
@ -248,7 +248,8 @@ public abstract class TouchinService<TLogic extends Logic> extends Service {
|
|||
public Disposable untilDestroy(@NonNull final Completable completable,
|
||||
@NonNull final Action onCompletedAction,
|
||||
@NonNull final Consumer<Throwable> onErrorAction) {
|
||||
return until(completable.toObservable(), isCreatedSubject.map(created -> !created), Functions.emptyConsumer(), onErrorAction, onCompletedAction);
|
||||
return until(completable.toObservable(), isCreatedSubject.map(created -> !created),
|
||||
Functions.emptyConsumer(), onErrorAction, onCompletedAction);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
|
|||
|
|
@ -76,18 +76,17 @@ public class EditTextValidationController<TModel extends Serializable>
|
|||
}
|
||||
|
||||
@Nullable
|
||||
@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.NPathComplexity"})
|
||||
private NonNullPair<Boolean, Observable<ValidationState>> getValidationPair(final boolean activated,
|
||||
@NonNull Optional<String> optionalText,
|
||||
@NonNull final Optional<String> optionalText,
|
||||
@Nullable final Boolean focusIn,
|
||||
final boolean showError) {
|
||||
final String text = optionalText.get();
|
||||
if (focusIn == null && TextUtils.isEmpty(text) && !activated && !showError) {
|
||||
return null;
|
||||
}
|
||||
final boolean focus = focusIn == null ? false : focusIn;
|
||||
final boolean focus = focusIn != null && focusIn;
|
||||
if (TextUtils.isEmpty(text)) {
|
||||
return new NonNullPair<>(focus, (activated || showError)
|
||||
return new NonNullPair<>(focus, activated || showError
|
||||
? getValidator().getValidationStateWhenEmpty().observe()
|
||||
: Observable.just(ValidationState.INITIAL));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import android.support.annotation.Nullable;
|
|||
import java.io.Serializable;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.Single;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import ru.touchin.roboswag.core.observables.Changeable;
|
||||
import ru.touchin.roboswag.core.observables.NonNullChangeable;
|
||||
|
|
@ -143,7 +142,7 @@ public abstract class EditTextValidator<TModel extends Serializable> extends Val
|
|||
*
|
||||
* @param text - input text.
|
||||
* @return pair with final {@link ValidationState} that is always not null and a model that we get after converting the text.
|
||||
* Model can be null if validation fails on primary or final checks.
|
||||
* Model can be null if validation fails on primary or final checks.
|
||||
*/
|
||||
@NonNull
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class SameTypeValidator<TModel extends Serializable> extends Validator<TM
|
|||
*
|
||||
* @param wrapperModel - not null value that should be validated.
|
||||
* @return pair with final {@link ValidationState} that is always not null and a model that we get after converting the {@link TModel}.
|
||||
* Model can be null if validation fails.
|
||||
* Model can be null if validation fails.
|
||||
*/
|
||||
@NonNull
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public abstract class Validator<TWrapperModel extends Serializable, TModel exten
|
|||
*
|
||||
* @param wrapperModel - not null value that should be validated.
|
||||
* @return pair with final {@link ValidationState} that is always not null and a model that we get after converting the {@link TWrapperModel}.
|
||||
* Model can be null if validation fails.
|
||||
* Model can be null if validation fails.
|
||||
*/
|
||||
@NonNull
|
||||
public abstract Observable<HalfNullablePair<ValidationState, TModel>> fullValidateAndGetModel(@NonNull final TWrapperModel wrapperModel);
|
||||
|
|
|
|||
Loading…
Reference in New Issue