Added a list of column names we expect to see in history, started building skeleton of real display logic

pull/14/head
Sam Bosley 12 years ago
parent 7833916490
commit 60f7f816c2

@ -104,4 +104,28 @@ public class History extends AbstractModel {
return CREATOR;
}
// ---- Column ids
public static final String COL_TAG_ADDED = "tag_added";
public static final String COL_TAG_REMOVED = "tag_removed";
public static final String COL_SHARED_WITH = "shared_with";
public static final String COL_UNSHARED_WITH = "unshared_with";
public static final String COL_MEMBER_ADDED = "member_added";
public static final String COL_MEMBER_REMOVED = "member_removed";
public static final String COL_COMPLETED_AT = "completed_at";
public static final String COL_DELETED_AT = "deleted_at";
public static final String COL_IMPORTANCE = "importance";
public static final String COL_NOTES_LENGTH = "notes_length";
public static final String COL_PUBLIC = "public";
public static final String COL_DUE = "due";
public static final String COL_REPEAT = "repeat";
public static final String COL_TASK_REPEATED = "task_repeated";
public static final String COL_TITLE = "title";
public static final String COL_NAME = "name";
public static final String COL_DESCRIPTION = "description";
public static final String COL_PICTURE_ID = "picture_id";
public static final String COL_DEFAULT_LIST_IMAGE_ID = "default_list_image_id";
public static final String COL_IS_SILENT = "is_silent";
public static final String COL_IS_FAVORITE = "is_favorite";
public static final String COL_USER_ID = "user_id";
}

@ -17,6 +17,8 @@
<string name="update_string_tag_comment">%1$s on %2$s: %3$s</string>
<string name="update_string_user_self">You</string>
<string name="history_this_list">this list</string>
<string name="history_this_task">this task</string>
<!-- <string name="update_string_friends">%1$s is now friends with %2$s</string>
<string name="update_string_request_friendship">%1$s wants to be friends with you</string>

@ -419,7 +419,48 @@ public class UpdateAdapter extends CursorAdapter {
return builder;
}
@SuppressWarnings("nls")
public static Spanned getHistoryComment(final AstridActivity context, History history, String linkColor, String fromView) {
String column = history.getValue(History.COLUMN);
if (History.COL_TAG_ADDED.equals(column) || History.COL_TAG_REMOVED.equals(column)) {
//
} else if (History.COL_SHARED_WITH.equals(column) || History.COL_UNSHARED_WITH.equals(column)) {
//
} else if (History.COL_MEMBER_ADDED.equals(column) || History.COL_MEMBER_REMOVED.equals(column)) {
//
} else if (History.COL_COMPLETED_AT.equals(column)) {
//
} else if (History.COL_DELETED_AT.equals(column)) {
//
} else if (History.COL_IMPORTANCE.equals(column)) {
//
} else if (History.COL_NOTES_LENGTH.equals(column)) {
//
} else if (History.COL_PUBLIC.equals(column)) {
//
} else if (History.COL_DUE.equals(column)) {
//
} else if (History.COL_REPEAT.equals(column)) {
//
} else if (History.COL_TASK_REPEATED.equals(column)) {
//
} else if (History.COL_TITLE.equals(column)) {
//
} else if (History.COL_NAME.equals(column)) {
//
} else if (History.COL_DESCRIPTION.equals(column)) {
//
} else if (History.COL_PICTURE_ID.equals(column) || History.COL_DEFAULT_LIST_IMAGE_ID.equals(column)) {
//
} else if (History.COL_IS_SILENT.equals(column)) {
//
} else if (History.COL_IS_FAVORITE.equals(column)) {
//
} else if (History.COL_USER_ID.equals(column)) {
//
} else {
//
}
return null;
}

Loading…
Cancel
Save