Skip to content

Commit

Permalink
Merge pull request #174 from Infosys/username-null-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jainhitesh9998 authored Oct 10, 2023
2 parents dd987ef + 65f9e6f commit ec6057e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void onResponse(Call call, Response response) {
loginService.setPasswordHash(username, password);
AuthResponsePigeon.AuthResponse authResponse = new AuthResponsePigeon.AuthResponse.Builder()
.setResponse(wrapper.getResponse())
.setUsername(sharedPreferences.getString(USER_NAME, null))
.setUsername(sharedPreferences.getString(USER_NAME, username))
.setIsDefault(sharedPreferences.getBoolean(IS_DEFAULT, false))
.setIsOfficer(sharedPreferences.getBoolean(IS_OPERATOR, false))
.setIsSupervisor(sharedPreferences.getBoolean(IS_SUPERVISOR, false))
Expand Down Expand Up @@ -141,7 +141,7 @@ private void offlineLogin(final String username, final String password, AuthResp
String token = loginService.saveUserAuthTokenOffline(username);
AuthResponsePigeon.AuthResponse authResponse = new AuthResponsePigeon.AuthResponse.Builder()
.setResponse(token)
.setUsername(sharedPreferences.getString(USER_NAME, null))
.setUsername(sharedPreferences.getString(USER_NAME, username))
.setIsDefault(sharedPreferences.getBoolean(IS_DEFAULT, false))
.setIsOfficer(sharedPreferences.getBoolean(IS_OPERATOR, false))
.setIsSupervisor(sharedPreferences.getBoolean(IS_SUPERVISOR, false))
Expand Down

0 comments on commit ec6057e

Please sign in to comment.