fix filter by none

This commit is contained in:
Ezequiel Bergamaschi 2014-02-01 04:13:18 -03:00 committed by Ezequiel Bergamaschi
parent 1ead555e09
commit 1a2ba04b76

View File

@ -67,16 +67,19 @@ public abstract class MindmapFilter {
static public MindmapFilter parse(@Nullable final String valueStr) { static public MindmapFilter parse(@Nullable final String valueStr) {
MindmapFilter result = null; MindmapFilter result = null;
for (MindmapFilter value : MindmapFilter.values) { if (valueStr != null) {
if (value.id.equals(valueStr)) { for (MindmapFilter value : MindmapFilter.values) {
result = value; if (value.id.equals(valueStr)) {
break; result = value;
break;
}
} }
} // valueStr is not a default filter
// valueStr is not a default filter if (result == null) {
if (result == null) { result = new LabelFilter(valueStr);
assert valueStr != null; }
result = new LabelFilter(valueStr); } else {
result = ALL;
} }
return result; return result;
} }