diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-06-14 16:53:50 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-06-14 16:53:50 +0300 |
commit | cc6c8fd7e61a15b8ce1376bb94418f9a091b7160 (patch) | |
tree | e55baff36ddf902f151a50eb819eecc7ee0873f2 | |
parent | 1207ec0b53d15666788313d26b1e264f4b274ebc (diff) |
Deal with ÄÖÜ and move hardcoded string to resources
-rw-r--r-- | app/src/main/java/it/niedermann/owncloud/notes/persistence/LoadNotesListTask.java | 4 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/persistence/LoadNotesListTask.java b/app/src/main/java/it/niedermann/owncloud/notes/persistence/LoadNotesListTask.java index 23573d24..19d0a903 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/persistence/LoadNotesListTask.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/persistence/LoadNotesListTask.java @@ -98,8 +98,8 @@ public class LoadNotesListTask extends AsyncTask<Void, Void, List<Item>> { for (int i = 0; i < noteList.size(); i++) { DBNote currentNote = noteList.get(i); String initials = currentNote.getTitle().substring(0, 1).toUpperCase(); - if (!initials.matches("[A-Z]")) { - initials = initials.matches("[\\u0250-\\uFFFF]") ? "Other" : "#"; + if (!initials.matches("[A-Z\\u00C0-\\u00DF]")) { + initials = initials.matches("[\\u0250-\\uFFFF]") ? context.getString(R.string.simple_other) : "#"; } if (i > 0 && !initials.equals(lastInitials)) { itemList.add(new SectionItem(initials)); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7ccda8e4..6aa3a1c0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -302,4 +302,5 @@ <string name="formatting_help_unsupported_body_2">Tables</string> <string name="formatting_help_unsupported_body_3">Images</string> <string name="formatting_help_unsupported_body_4">If you are interested in contributing support for one of those features, get in contact with us via GitHub or E-Mail.</string> + <string name="simple_other">Other</string> </resources> |