redesigned sharing tab, hooked to the backend, minor language upgrades, added status switch handling to the background task #41
@ -182,12 +182,10 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
Claim userId = jwt.getClaim("nameid");
|
Claim userId = jwt.getClaim("nameid");
|
||||||
Claim role = jwt.getClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/role");
|
Claim role = jwt.getClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/role");
|
||||||
|
|
||||||
if(Objects.requireNonNull(role.asString()).equals("Student")){
|
if(!Objects.requireNonNull(role.asString()).equals("Student")){
|
||||||
PrefUtils.storeIsTutor(getApplicationContext(), false);
|
PrefUtils.storeIsTutor(getApplicationContext(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.e("LOGOWANIE",role.asString());
|
|
||||||
|
|
||||||
PrefUtils.storeIsLoggedIn(getApplicationContext(), true);
|
PrefUtils.storeIsLoggedIn(getApplicationContext(), true);
|
||||||
PrefUtils.storeApiKey(getApplicationContext(), token);
|
PrefUtils.storeApiKey(getApplicationContext(), token);
|
||||||
PrefUtils.storeUserId(getApplicationContext(), userId.asString());
|
PrefUtils.storeUserId(getApplicationContext(), userId.asString());
|
||||||
|
Loading…
Reference in New Issue
Block a user