Skip to content

Commit

Permalink
Merge pull request #889 from himanshu112/master
Browse files Browse the repository at this point in the history
Fix :issue #791 - Invalid Toast Message
  • Loading branch information
droidchef authored Dec 29, 2018
2 parents fed9238 + daf2061 commit 38814a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l)

case R.id.sp_groups:
groupId = groupNameIdHashMap.get(groupNames.get(i));
if (groupId == -1) {
Toaster.show(rootView, getString(R.string.error_select_group));
}
break;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ public static String errorMessage(Throwable throwableError) {
try {
if (throwableError instanceof HttpException) {
errorMessage = ((HttpException) throwableError).response().errorBody().string();
errorMessage = MFErrorParser.parseError(errorMessage).getErrors()
errorMessage = MFErrorParser.parseError(errorMessage).getErrors()
.get(0).getDefaultUserMessage();
} else {
errorMessage = throwableError.toString();
}
} catch (Throwable throwable) {
RxJavaPlugins.getInstance().getErrorHandler().handleError(throwable);
Expand Down
1 change: 1 addition & 0 deletions mifosng-android/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@
<string name="group_list">Group List</string>
<string name="error_invalid_amount">Invalid Amount Entered</string>
<string name="error_select_office">Please Select an Office</string>
<string name="error_select_group">Please Select a Group</string>
<string name="error_select_payment">Please Select Payment Type</string>
<string name="error_select_fund">Please Select Fund</string>
<string name="error_select_interestCalculationPeriod">Please Select Interest Calculation Period</string>
Expand Down

0 comments on commit 38814a9

Please sign in to comment.