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 {
145145
146146 @ UiThread
147147 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 );
155150 }
156151
157152 }
@@ -421,6 +416,7 @@ public void setShowErrorStateOnBack(boolean showErrorStateOnBack) {
421416 public void setShowErrorStateOnBackEnabled (boolean showErrorStateOnBackEnabled ) {
422417 this .mShowErrorStateOnBackEnabled = showErrorStateOnBackEnabled ;
423418 }
419+
424420 /**
425421 * Set whether the errors should be displayed when they occur or not. Default is <code>false</code>.
426422 *
@@ -746,8 +742,13 @@ private void onComplete() {
746742 invalidateCurrentPosition ();
747743 return ;
748744 }
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+ }
751752 }
752753
753754 private void onUpdate (int newStepPosition , boolean userTriggeredChange ) {
You can’t perform that action at this time.
0 commit comments