Fixed double re-login (again)

This commit is contained in:
Caesar2011
2019-02-03 23:32:42 +01:00
parent a94ce6c755
commit 7ae8a13c9f
2 changed files with 11 additions and 3 deletions

View File

@@ -19,6 +19,8 @@ import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Timer;
import java.util.TimerTask;
import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
@@ -360,7 +362,7 @@ public class MainActivity extends AppCompatActivity
setRefreshFailedBanner(false);
updateNavigation();
changeFragment(getDefaultFragmentAfterLogout());
mAccountManager.getTokenByType(AccountGeneral.ACCOUNT_TYPE, AccountGeneral.AUTHTOKEN_TYPE_KVV, null, null);
//mAccountManager.getTokenByType(AccountGeneral.ACCOUNT_TYPE, AccountGeneral.AUTHTOKEN_TYPE_KVV, null, null);
}
private void toLoginState(String fullName, String email, int newFragment) {

View File

@@ -51,8 +51,14 @@ public class Login extends HTTPService {
boolean result = setToken(tokenKVV, tokenBB);
mLoginPending = false;
mRestoreCallbacks.responseResponse(result ? RESTORE_STATUS_SUCCESS : RESTORE_STATUS_INVALID_PASSWORD);
}, e -> mRestoreCallbacks.responseResponse(RESTORE_STATUS_ERROR));
}, e -> mRestoreCallbacks.responseResponse(RESTORE_STATUS_ERROR));
}, e -> {
mLoginPending = false;
mRestoreCallbacks.responseResponse(RESTORE_STATUS_ERROR);
});
}, e -> {
mLoginPending = false;
mRestoreCallbacks.responseResponse(RESTORE_STATUS_ERROR);
});
}
public void isOfflineStoredAvailable(BooleanInterface callback) {