#635 - Remove task fragment if task has been canceled

This ensures that we aren't resetting password input on configuration changes after our task has been canceled
This commit is contained in:
Joshua Soberg 2021-02-04 20:35:24 -05:00
parent d814dab8a8
commit 39b93fe7e8

View file

@ -197,6 +197,10 @@ public class AuthenticateActivity extends BaseActivity
TaskFragment taskFragment = findTaskFragment();
if (taskFragment != null) {
if (taskFragment.task.isCanceled()) {
// The task was canceled, so remove the task fragment and reset password input.
getFragmentManager().beginTransaction()
.remove(taskFragment)
.commit();
resetPasswordInput();
} else {
taskFragment.task.setCallback(this::handleResult);