Fixed double re-login (again)
This commit is contained in:
@@ -19,6 +19,8 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.Timer;
|
||||||
|
import java.util.TimerTask;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
@@ -360,7 +362,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
setRefreshFailedBanner(false);
|
setRefreshFailedBanner(false);
|
||||||
updateNavigation();
|
updateNavigation();
|
||||||
changeFragment(getDefaultFragmentAfterLogout());
|
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) {
|
private void toLoginState(String fullName, String email, int newFragment) {
|
||||||
|
|||||||
@@ -51,8 +51,14 @@ public class Login extends HTTPService {
|
|||||||
boolean result = setToken(tokenKVV, tokenBB);
|
boolean result = setToken(tokenKVV, tokenBB);
|
||||||
mLoginPending = false;
|
mLoginPending = false;
|
||||||
mRestoreCallbacks.responseResponse(result ? RESTORE_STATUS_SUCCESS : RESTORE_STATUS_INVALID_PASSWORD);
|
mRestoreCallbacks.responseResponse(result ? RESTORE_STATUS_SUCCESS : RESTORE_STATUS_INVALID_PASSWORD);
|
||||||
}, e -> mRestoreCallbacks.responseResponse(RESTORE_STATUS_ERROR));
|
}, e -> {
|
||||||
}, e -> mRestoreCallbacks.responseResponse(RESTORE_STATUS_ERROR));
|
mLoginPending = false;
|
||||||
|
mRestoreCallbacks.responseResponse(RESTORE_STATUS_ERROR);
|
||||||
|
});
|
||||||
|
}, e -> {
|
||||||
|
mLoginPending = false;
|
||||||
|
mRestoreCallbacks.responseResponse(RESTORE_STATUS_ERROR);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void isOfflineStoredAvailable(BooleanInterface callback) {
|
public void isOfflineStoredAvailable(BooleanInterface callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user