mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 21:06:44 -06:00
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,
|
profile?.empty ?: false,
|
||||||
addedDate
|
addedDate
|
||||||
))
|
))
|
||||||
|
}
|
||||||
|
|
||||||
data.setSyncNext(ENDPOINT_LIBRUS_API_NORMAL_GRADES, SYNC_ALWAYS, MainActivity.DRAWER_ITEM_GRADES)
|
data.setSyncNext(ENDPOINT_LIBRUS_API_NORMAL_GRADES, SYNC_ALWAYS, MainActivity.DRAWER_ITEM_GRADES)
|
||||||
onSuccess()
|
onSuccess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ class LibrusApiMe(override val data: DataLibrus,
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
apiGet(TAG, "Me") { json ->
|
apiGet(TAG, "Me") { json ->
|
||||||
val me = json?.getJsonObject("Me")
|
val me = json.getJsonObject("Me")
|
||||||
val account = me?.getJsonObject("Account")
|
val account = me?.getJsonObject("Account")
|
||||||
val user = me?.getJsonObject("User")
|
val user = me?.getJsonObject("User")
|
||||||
|
|
||||||
|
@ -134,21 +134,21 @@ public class HomeFragment extends Fragment {
|
|||||||
b.test2.setOnClickListener((v -> {
|
b.test2.setOnClickListener((v -> {
|
||||||
List<Pair<Integer, Integer>> list = new ArrayList<>();
|
List<Pair<Integer, Integer>> list = new ArrayList<>();
|
||||||
list.add(new Pair<>(DRAWER_ITEM_HOME, 0));
|
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.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
|
||||||
b.test3.setOnClickListener((v -> {
|
b.test3.setOnClickListener((v -> {
|
||||||
List<Pair<Integer, Integer>> list = new ArrayList<>();
|
List<Pair<Integer, Integer>> list = new ArrayList<>();
|
||||||
list.add(new Pair<>(DRAWER_ITEM_MESSAGES, TYPE_SENT));
|
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.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
|
||||||
b.test4.setOnClickListener((v -> {
|
b.test4.setOnClickListener((v -> {
|
||||||
List<Pair<Integer, Integer>> list = new ArrayList<>();
|
List<Pair<Integer, Integer>> list = new ArrayList<>();
|
||||||
list.add(new Pair<>(DRAWER_ITEM_GRADES, 0));
|
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()));
|
//((TextView)v.findViewById(R.id.nextSync)).setText(getString(R.string.next_sync_format,Time.fromMillis(app.appJobs.syncJobTime).getStringHMS()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user