Skip to content

Commit

Permalink
- Fixed html entity encoding in theme name.
Browse files Browse the repository at this point in the history
- Fixed list refresh bug when installing theme.
  • Loading branch information
micwallace committed Jun 20, 2016
1 parent 37ae5cf commit 143a744
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,15 @@ public void onClick(DialogInterface dialog, int which) {
}
}

@Override
protected void onResume() {
super.onResume();
refreshList();
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data){
if (resultCode==RESULT_CODE_THEME_UPDATED) {
refreshList();
themesEdited = true;
setResult(RESULT_CODE_THEME_UPDATED);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.text.Html;

import org.json.JSONArray;
import org.json.JSONException;
Expand Down Expand Up @@ -165,6 +166,9 @@ private boolean validateThemeJson(JSONObject theme){
if (!theme.has("name") || "".equals(theme.get("name")))
return false;

// decode Html entities in name
theme.put("name", Html.fromHtml(theme.getString("name")));

JSONObject impValues = theme.getJSONObject("values");
JSONObject defaults = defaultValues.getTheme().getJSONObject("values");

Expand Down

0 comments on commit 143a744

Please sign in to comment.