Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
Add comments to server side actions that could be improved.
Browse files Browse the repository at this point in the history
- Break icon should be configurable
- Track colors should be configurable
- Track images should be associated with the Track not the session

Change-Id: I026d4a4e79cf410f76a307946d917c26273bec88
  • Loading branch information
kroikie committed Jul 8, 2016
1 parent ab2cd79 commit df7def3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,11 @@ int getSessionIcon(int sessionType) {
}
}

// TODO: Improve the mapping of icons to breaks.
// Initially this was a convenience method and there were few icons to be assigned to
// breaks. The current implementation could be improved if the icon - break mapping
// was defined via a configuration file and loaded at runtime. This would make the breaks
// more flexible.
public static
@DrawableRes
int getBreakIcon(String breakTitle) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ public JsonArray extractTags(JsonDataSources sources) {
}
}

// TODO: Directly associate Track images with Tags.
// Track images were retrieved from session images. This required that sessions on the
// same track have the same image. Thus here, we needed to check the Track of each
// session even if the corresponding Track was already assigned an image. If all sessions
// in the same track are going to have the same image then it would make more sense for
// the images to be attached to the Tag/Track rather than the session.
if (tagName.getAsString().startsWith(TRACK)) {
// Extract photo urls from topics for TRACK tags.
String objectId = extractTrackPhotoObjectId(sources,
Expand Down Expand Up @@ -683,6 +689,10 @@ private String extractTrackPhotoObjectId(JsonDataSources sources, String trackId
return "";
}

// TODO: improve the association of colors with tracks.
// Track and corresponding track colors were hard coded. These values should be defined at best
// as part of a config file retrieved from the application server, or at least as a config file
// within the application.
/**
* Provides the appropriate color given the track name.
*
Expand Down

0 comments on commit df7def3

Please sign in to comment.