File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
material-stepper/src/main/java/com/stepstone/stepper Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -145,13 +145,8 @@ public class OnCompleteClickedCallback extends AbstractOnButtonClickedCallback {
145
145
146
146
@ UiThread
147
147
public void complete () {
148
- final int totalStepCount = mStepAdapter .getCount ();
149
-
150
- if (mCurrentStepPosition < totalStepCount - 1 ) {
151
- return ;
152
- }
153
-
154
- onComplete ();
148
+ invalidateCurrentPosition ();
149
+ mListener .onCompleted (mCompleteNavigationButton );
155
150
}
156
151
157
152
}
@@ -421,6 +416,7 @@ public void setShowErrorStateOnBack(boolean showErrorStateOnBack) {
421
416
public void setShowErrorStateOnBackEnabled (boolean showErrorStateOnBackEnabled ) {
422
417
this .mShowErrorStateOnBackEnabled = showErrorStateOnBackEnabled ;
423
418
}
419
+
424
420
/**
425
421
* Set whether the errors should be displayed when they occur or not. Default is <code>false</code>.
426
422
*
@@ -746,8 +742,13 @@ private void onComplete() {
746
742
invalidateCurrentPosition ();
747
743
return ;
748
744
}
749
- invalidateCurrentPosition ();
750
- mListener .onCompleted (mCompleteNavigationButton );
745
+
746
+ OnCompleteClickedCallback onCompleteClickedCallback = new OnCompleteClickedCallback ();
747
+ if (step instanceof BlockingStep ) {
748
+ ((BlockingStep ) step ).onCompleteClicked (onCompleteClickedCallback );
749
+ } else {
750
+ onCompleteClickedCallback .complete ();
751
+ }
751
752
}
752
753
753
754
private void onUpdate (int newStepPosition , boolean userTriggeredChange ) {
You can’t perform that action at this time.
0 commit comments