Skip to content

Commit 671cb5d

Browse files
committed
Honor PC constraint in tag
Close moneymanagerex#2030
1 parent f4e68b5 commit 671cb5d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

app/src/main/java/com/money/manager/ex/tag/TagListFragment.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,12 @@ public void onClick(DialogInterface dialog, int which) {
350350
// take tag name from the input field.
351351
String name = edtTagName.getText().toString();
352352

353+
// issue #2030: PC version does not support space
354+
if (name.contains(" ") || name.contains("&") || name.contains("&")) {
355+
name = name.replaceAll("[ &|]", "_");
356+
Toast.makeText(getContext(), R.string.space_replaced_with__,Toast.LENGTH_LONG).show();
357+
}
358+
353359
TagService service = new TagService(mContext);
354360

355361
// check if action is update or insert

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@
243243
<string name="tag_empty_list">No Tag has been found. To create one, tap the green plus button.</string>
244244
<string name="tag_can_not_deleted">The selected tag can not be deleted because it is referenced</string>
245245
<string name="db_tag_update_failed">Updating Tag failed</string>
246+
<string name="space_replaced_with__">Space, &amp; and | was replaced with "_"</string>
246247

247248
<!-- Scheduled Transactions, formerly Recurring Transactions -->
248249
<string name="none">None</string>

0 commit comments

Comments
 (0)