Fixed Theme Parser

When there are a space on the theme, this will cause some problems with the parser
This commit is contained in:
Laky64 2022-07-09 17:37:57 +02:00 committed by GitHub
parent 6cb1cdf898
commit 1303bdc9d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8391,12 +8391,12 @@ public class Theme {
int value; int value;
if (param.length() > 0 && param.charAt(0) == '#') { if (param.length() > 0 && param.charAt(0) == '#') {
try { try {
value = Color.parseColor(param); value = Color.parseColor(param.trim());
} catch (Exception ignore) { } catch (Exception ignore) {
value = Utilities.parseInt(param); value = Utilities.parseInt(param.trim());
} }
} else { } else {
value = Utilities.parseInt(param); value = Utilities.parseInt(param.trim());
} }
stringMap.put(key, value); stringMap.put(key, value);
} }