File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Shrine/app/src/main/java/com/authentication/shrine/repository Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -404,7 +404,7 @@ class AuthRepository @Inject constructor(
404
404
apiResult.getSessionId()?.also {
405
405
prefs[SESSION_ID ] = it
406
406
}
407
- prefs[USERNAME ] = apiResult.body()?.username ? : " "
407
+ prefs[USERNAME ] = apiResult.body()?.username.orEmpty()
408
408
prefs[DISPLAYNAME ] = apiResult.body()?.displayName.orEmpty()
409
409
}
410
410
AuthResult .Success (Unit )
@@ -680,7 +680,7 @@ class AuthRepository @Inject constructor(
680
680
apiResult.getSessionId()?.let { newSessionId ->
681
681
dataStore.edit { prefs ->
682
682
prefs[SESSION_ID ] = newSessionId
683
- prefs[USERNAME ] = apiResult.body()?.username ? : " "
683
+ prefs[USERNAME ] = apiResult.body()?.username.orEmpty()
684
684
prefs[DISPLAYNAME ] = apiResult.body()?.displayName.orEmpty()
685
685
}
686
686
return true
You can’t perform that action at this time.
0 commit comments