Skip to content

Commit

Permalink
#75 fixed category exists error message
Browse files Browse the repository at this point in the history
  • Loading branch information
bugy committed Mar 18, 2017
1 parent fbac808 commit cc98497
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public void onCreate(String name) {
private void addCategory(String name, Context context, DataStorage dataStorage) {
if (!ModelHelper.isUnique(null, name, (ShopListActivity) context)) {
final Toast toast = Toast.makeText(context,
context.getResources().getString(R.string.category_already_exists),
context.getResources().getString(R.string.category_already_exists, name),
Toast.LENGTH_LONG);
toast.show();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ public void onClick(View view) {
if (!ModelHelper.isUnique(category, name, activity)) {
final Toast toast = Toast.makeText(
getHostingActivity(),
getHostingActivity().getResources().getString(R.string.category_already_exists),
getHostingActivity().getResources().getString(
R.string.category_already_exists,
name),
Toast.LENGTH_LONG);
toast.show();
return;
Expand Down

0 comments on commit cc98497

Please sign in to comment.