Skip to content

Commit

Permalink
Use existing FormController variable which can't be null
Browse files Browse the repository at this point in the history
  • Loading branch information
lognaturel committed Nov 5, 2018
1 parent f22b49d commit cefc122
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,9 @@ public void onClick(View v) {
jumpBeginningButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
FormController fc = Collect.getInstance().getFormController();
if (fc != null) {
fc.getTimerLogger().exitView();
fc.jumpToIndex(FormIndex.createBeginningOfFormIndex());
}
formController.getTimerLogger().exitView();
formController.jumpToIndex(FormIndex.createBeginningOfFormIndex());

setResult(RESULT_OK);
finish();
}
Expand All @@ -117,11 +115,9 @@ public void onClick(View v) {
jumpEndButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
FormController fc = Collect.getInstance().getFormController();
if (fc != null) {
fc.getTimerLogger().exitView();
fc.jumpToIndex(FormIndex.createEndOfFormIndex());
}
formController.getTimerLogger().exitView();
formController.jumpToIndex(FormIndex.createEndOfFormIndex());

setResult(RESULT_OK);
finish();
}
Expand Down

0 comments on commit cefc122

Please sign in to comment.