diff --git a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardContainerFragment.java b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardContainerFragment.java index e9bb6810..f21a8bf3 100644 --- a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardContainerFragment.java +++ b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardContainerFragment.java @@ -117,7 +117,7 @@ private static class DashboardsQuery implements Query { @Override public Boolean query(Context context) { - List dashboards = Dhis2.dashboards().query(); + List dashboards = Dhis2.dashboards().list(); return dashboards != null && dashboards.size() > 0; } } diff --git a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardFragment.java b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardFragment.java index 268ad524..d6e82b22 100644 --- a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardFragment.java +++ b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardFragment.java @@ -234,12 +234,13 @@ public List query(Context context) { Dashboard dashboard = new Dashboard(); dashboard.setId(mDashboardId); - List dashboardItems = Dhis2.dashboardItems() - .filterByType(dashboard, DashboardItemContent.TYPE_MESSAGES); + /* List dashboardItems = Dhis2.dashboardItems() + .filterByType(dashboard, DashboardItemContent.TYPE_MESSAGES); */ + List dashboardItems = Dhis2.dashboardItems().list(); if (dashboardItems != null && !dashboardItems.isEmpty()) { for (DashboardItem dashboardItem : dashboardItems) { List dashboardElements = Dhis2 - .dashboardElements().query(dashboardItem); + .dashboardElements().list(dashboardItem); dashboardItem.setDashboardElements(dashboardElements); } } diff --git a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardItemAddFragment.java b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardItemAddFragment.java index 6d92d3fb..e671e35e 100644 --- a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardItemAddFragment.java +++ b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardItemAddFragment.java @@ -119,7 +119,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, @Override public void onViewCreated(View view, Bundle savedInstanceState) { long dashboardId = getArguments().getLong(DASHBOARD_ID); - mDashboard = Dhis2.dashboards().query(dashboardId); + mDashboard = Dhis2.dashboards().get(dashboardId); ButterKnife.bind(this, view); @@ -164,7 +164,7 @@ public void onButtonClick(View v) { @OnItemClick(R.id.listview_simple) public void onItemClick(AdapterView parent, View view, int position, long id) { OptionAdapterValue adapterValue = mAdapter.getItem(position); - DashboardItemContent resource = Dhis2.dashboardItemContents().query(adapterValue.id); + DashboardItemContent resource = Dhis2.dashboardItemContents().get(adapterValue.id); Dhis2.dashboards().addDashboardContent(mDashboard, resource); DhisService.getInstance().syncDashboards(); @@ -264,7 +264,7 @@ public List query(Context context) { return new ArrayList<>(); } - List resources = Dhis2.dashboardItemContents().query(mTypes); + List resources = Dhis2.dashboardItemContents().list(mTypes); List adapterValues = new ArrayList<>(); for (DashboardItemContent dashboardItemContent : resources) { adapterValues.add(new OptionAdapterValue(dashboardItemContent.getUId(), diff --git a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardManageFragment.java b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardManageFragment.java index 1d3c7b53..c63cc55a 100644 --- a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardManageFragment.java +++ b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardManageFragment.java @@ -104,7 +104,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { mDashboard = Dhis2.dashboards() - .query(getArguments().getLong(DASHBOARD_ID)); + .get(getArguments().getLong(DASHBOARD_ID)); ButterKnife.bind(this, view); diff --git a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardViewPagerFragment.java b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardViewPagerFragment.java index c2e62531..5e2b51dd 100644 --- a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardViewPagerFragment.java +++ b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/dashboard/DashboardViewPagerFragment.java @@ -263,7 +263,7 @@ private static class DashboardQuery implements Query> { @Override public List query(Context context) { - List dashboards = Dhis2.dashboards().query(); + List dashboards = Dhis2.dashboards().list(); Collections.sort(dashboards, Dashboard.DISPLAY_NAME_COMPARATOR); return dashboards; } diff --git a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/interpretation/InterpretationCreateFragment.java b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/interpretation/InterpretationCreateFragment.java index 83fe305d..dd704e10 100644 --- a/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/interpretation/InterpretationCreateFragment.java +++ b/app/src/main/java/org/hisp/dhis/android/dashboard/ui/fragments/interpretation/InterpretationCreateFragment.java @@ -103,7 +103,7 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { /* List elements = Models.dashboardElements() .filter(mDashboardItem, State.TO_DELETE); */ - List elements = Dhis2.dashboardElements().query(mDashboardItem); + List elements = Dhis2.dashboardElements().list(mDashboardItem); mDashboardItem.setDashboardElements(elements); mDialogLabel.setText(getString(R.string.create_interpretation));