mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 10:54:36 -06:00
[API/Iuczniowie] Fix syncing grades without color
This commit is contained in:
parent
2eee9e77e3
commit
d7a6c222f7
@ -880,11 +880,17 @@ public class Iuczniowie implements EdziennikInterface {
|
||||
boolean countToTheAverage = jGrade.get("DoSredniej").getAsBoolean();
|
||||
float value = jGrade.get("WartoscDoSred").getAsFloat();
|
||||
|
||||
String gradeColor = jGrade.get("Kolor").getAsString();
|
||||
int colorInt = 0xff2196f3;
|
||||
if (!gradeColor.isEmpty()) {
|
||||
colorInt = Color.parseColor("#"+gradeColor);
|
||||
}
|
||||
|
||||
Grade gradeObject = new Grade(
|
||||
profileId,
|
||||
jGrade.get("idK").getAsLong(),
|
||||
jGrade.get("Kategoria").getAsString(),
|
||||
Color.parseColor("#"+jGrade.get("Kolor").getAsString()),
|
||||
colorInt,
|
||||
"",
|
||||
jGrade.get("Ocena").getAsString(),
|
||||
value,
|
||||
|
Loading…
Reference in New Issue
Block a user