From c225dde284dd3d0e3950402cef888d6bd2840f38 Mon Sep 17 00:00:00 2001 From: Abhilash G Date: Sat, 11 Mar 2017 02:23:25 +0530 Subject: [PATCH] style: Incorrect error message is displayed in the Centers activity --- .../mifosxdroid/online/centerlist/CenterListFragment.java | 2 +- .../mifosxdroid/online/centerlist/CenterListPresenter.java | 2 +- mifosng-android/src/main/res/values/strings.xml | 2 +- .../com/mifos/mifosxdroid/online/CenterListPresenterTest.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mifosng-android/src/main/java/com/mifos/mifosxdroid/online/centerlist/CenterListFragment.java b/mifosng-android/src/main/java/com/mifos/mifosxdroid/online/centerlist/CenterListFragment.java index ca65736c845..03153409306 100755 --- a/mifosng-android/src/main/java/com/mifos/mifosxdroid/online/centerlist/CenterListFragment.java +++ b/mifosng-android/src/main/java/com/mifos/mifosxdroid/online/centerlist/CenterListFragment.java @@ -254,7 +254,7 @@ public void onDatePicked(String date) { public void showFetchingError() { rv_centers.setVisibility(View.GONE); rlError.setVisibility(View.VISIBLE); - String errorMessage = getStringMessage(R.string.failed_to_fetch_groups) + String errorMessage = getStringMessage(R.string.failed_to_fetch_centers) + getStringMessage(R.string.new_line) + getStringMessage(R.string.click_to_refresh); mNoCenterText.setText(errorMessage); } diff --git a/mifosng-android/src/main/java/com/mifos/mifosxdroid/online/centerlist/CenterListPresenter.java b/mifosng-android/src/main/java/com/mifos/mifosxdroid/online/centerlist/CenterListPresenter.java index a6cfce4ae9b..baa84741e20 100644 --- a/mifosng-android/src/main/java/com/mifos/mifosxdroid/online/centerlist/CenterListPresenter.java +++ b/mifosng-android/src/main/java/com/mifos/mifosxdroid/online/centerlist/CenterListPresenter.java @@ -94,7 +94,7 @@ public void onCompleted() { public void onError(Throwable e) { getMvpView().showProgressbar(false); if (loadmore) { - getMvpView().showMessage(R.string.failed_to_fetch_center); + getMvpView().showMessage(R.string.failed_to_fetch_centers); } else { getMvpView().showFetchingError(); } diff --git a/mifosng-android/src/main/res/values/strings.xml b/mifosng-android/src/main/res/values/strings.xml index fe96ca0ae69..2553c01622c 100755 --- a/mifosng-android/src/main/res/values/strings.xml +++ b/mifosng-android/src/main/res/values/strings.xml @@ -565,7 +565,7 @@ Failed to add SavingsAccount Failed to fetch documents Failed to Fetch Groups - Failed to Fetch Center + Failed to Fetch Centers Failed to Fetch Group and Meeting Failed to fetch group and accounts Failed to fetch document diff --git a/mifosng-android/src/test/java/com/mifos/mifosxdroid/online/CenterListPresenterTest.java b/mifosng-android/src/test/java/com/mifos/mifosxdroid/online/CenterListPresenterTest.java index dfd9c6a42d6..59f21b7350b 100644 --- a/mifosng-android/src/test/java/com/mifos/mifosxdroid/online/CenterListPresenterTest.java +++ b/mifosng-android/src/test/java/com/mifos/mifosxdroid/online/CenterListPresenterTest.java @@ -102,7 +102,7 @@ public void testLoadMoreCenters() { verify(mCenterListMvpView).showProgressbar(true); verify(mCenterListMvpView).showMoreCenters(centerPage.getPageItems()); - verify(mCenterListMvpView, never()).showMessage(R.string.failed_to_fetch_center); + verify(mCenterListMvpView, never()).showMessage(R.string.failed_to_fetch_centers); verify(mCenterListMvpView).showProgressbar(false); } @@ -114,7 +114,7 @@ public void testLoadMoreCentersFails() { centerListPresenter.loadCenters(true, offset); verify(mCenterListMvpView).showProgressbar(true); - verify(mCenterListMvpView).showMessage(R.string.failed_to_fetch_center); + verify(mCenterListMvpView).showMessage(R.string.failed_to_fetch_centers); verify(mCenterListMvpView, never()).showFetchingError(); verify(mCenterListMvpView).showProgressbar(false); }