forked from github/szkolny
Merge remote-tracking branch 'origin/api-v2' into api-v2
This commit is contained in:
commit
93fcc0deb7
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,21 +134,21 @@ public class HomeFragment extends Fragment {
|
||||
b.test2.setOnClickListener((v -> {
|
||||
List<Pair<Integer, Integer>> list = new ArrayList<>();
|
||||
list.add(new Pair<>(DRAWER_ITEM_HOME, 0));
|
||||
EventBus.getDefault().post(new SyncProfileRequest(10, list));
|
||||
EventBus.getDefault().post(new SyncProfileRequest(app.profile.getId(), list));
|
||||
}));
|
||||
|
||||
b.test3.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
|
||||
b.test3.setOnClickListener((v -> {
|
||||
List<Pair<Integer, Integer>> list = new ArrayList<>();
|
||||
list.add(new Pair<>(DRAWER_ITEM_MESSAGES, TYPE_SENT));
|
||||
EventBus.getDefault().post(new SyncProfileRequest(10, list));
|
||||
EventBus.getDefault().post(new SyncProfileRequest(app.profile.getId(), list));
|
||||
}));
|
||||
|
||||
b.test4.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
|
||||
b.test4.setOnClickListener((v -> {
|
||||
List<Pair<Integer, Integer>> list = new ArrayList<>();
|
||||
list.add(new Pair<>(DRAWER_ITEM_GRADES, 0));
|
||||
EventBus.getDefault().post(new SyncProfileRequest(10, list));
|
||||
EventBus.getDefault().post(new SyncProfileRequest(app.profile.getId(), list));
|
||||
}));
|
||||
|
||||
//((TextView)v.findViewById(R.id.nextSync)).setText(getString(R.string.next_sync_format,Time.fromMillis(app.appJobs.syncJobTime).getStringHMS()));
|
||||
|
Loading…
Reference in New Issue
Block a user