From f6b50fbb5838893df6e5d6f0b591492a68cd7c1c Mon Sep 17 00:00:00 2001 From: Kacper Ziubryniewicz Date: Fri, 11 Oct 2019 20:27:24 +0200 Subject: [PATCH] [API/Librus] Fix grade syncing --- .../edziennik/api/v2/librus/data/api/LibrusApiGrades.kt | 6 +++--- .../edziennik/api/v2/librus/data/api/LibrusApiMe.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/api/LibrusApiGrades.kt b/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/api/LibrusApiGrades.kt index 3b93fa81..f95a6647 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/api/LibrusApiGrades.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/api/LibrusApiGrades.kt @@ -93,10 +93,10 @@ class LibrusApiGrades(override val data: DataLibrus, profile?.empty ?: false, addedDate )) - - data.setSyncNext(ENDPOINT_LIBRUS_API_NORMAL_GRADES, SYNC_ALWAYS, MainActivity.DRAWER_ITEM_GRADES) - onSuccess() } + + data.setSyncNext(ENDPOINT_LIBRUS_API_NORMAL_GRADES, SYNC_ALWAYS, MainActivity.DRAWER_ITEM_GRADES) + onSuccess() } } } diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/api/LibrusApiMe.kt b/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/api/LibrusApiMe.kt index 2e408b0b..586dbbf7 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/api/LibrusApiMe.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/api/LibrusApiMe.kt @@ -17,7 +17,7 @@ class LibrusApiMe(override val data: DataLibrus, init { apiGet(TAG, "Me") { json -> - val me = json?.getJsonObject("Me") + val me = json.getJsonObject("Me") val account = me?.getJsonObject("Account") val user = me?.getJsonObject("User") @@ -36,4 +36,4 @@ class LibrusApiMe(override val data: DataLibrus, onSuccess() } } -} \ No newline at end of file +}