Display tag_added/removed history (will work once server sends the hash including name)

pull/14/head
Sam Bosley 12 years ago
parent b4e6408de2
commit d64b978289

@ -23,6 +23,8 @@
<string name="history_this_list">this list</string>
<string name="history_this_task">this task</string>
<string name="history_tag_added">added %1$s to %2$s</string>
<string name="history_tag_removed">removed %1$s from %2$s</string>
<string name="history_left_list">left %s</string>
<string name="history_deleted">deleted %s</string>
<string name="history_undeleted">undeleted %s</string>

@ -463,7 +463,13 @@ public class UpdateAdapter extends CursorAdapter {
String column = history.getValue(History.COLUMN);
try {
if (History.COL_TAG_ADDED.equals(column) || History.COL_TAG_REMOVED.equals(column)) {
//
JSONObject tagObj = new JSONObject(newValue);
String tagName = tagObj.getString("name");
if (History.COL_TAG_ADDED.equals(column))
result = context.getString(R.string.history_tag_added, item, tagName);
else
result = context.getString(R.string.history_tag_removed, item, tagName);
} else if (History.COL_SHARED_WITH.equals(column) || History.COL_UNSHARED_WITH.equals(column)) {
JSONArray members = new JSONArray(newValue);
String userId = history.getValue(History.USER_UUID);

Loading…
Cancel
Save