Show/hide comments based on filter mode spec

pull/14/head
Sam Bosley 12 years ago
parent 7583683235
commit 9fc1efe45a

@ -46,6 +46,7 @@ import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.api.Filter; import com.todoroo.astrid.api.Filter;
import com.todoroo.astrid.api.FilterListItem; import com.todoroo.astrid.api.FilterListItem;
import com.todoroo.astrid.core.CustomFilterExposer; import com.todoroo.astrid.core.CustomFilterExposer;
import com.todoroo.astrid.data.TagData;
import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.helper.AsyncImageView; import com.todoroo.astrid.helper.AsyncImageView;
import com.todoroo.astrid.people.PeopleFilterMode; import com.todoroo.astrid.people.PeopleFilterMode;
@ -377,6 +378,21 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener
return result; return result;
} }
@Override
public void setupActivityFragment(TagData tagData) {
super.setupActivityFragment(tagData);
int visibility = (filterModeSpec.showComments() ? View.VISIBLE : View.GONE);
if (fragmentLayout != LAYOUT_TRIPLE) {
commentsButton.setVisibility(visibility);
} else {
View container = findViewById(R.id.taskedit_fragment_container);
if (container != null)
container.setVisibility(visibility);
}
}
private void setListsDropdownSelected(boolean selected) { private void setListsDropdownSelected(boolean selected) {
int oldTextColor = lists.getTextColors().getDefaultColor(); int oldTextColor = lists.getTextColors().getDefaultColor();
int textStyle = (selected ? R.style.TextAppearance_ActionBar_ListsHeader_Selected : int textStyle = (selected ? R.style.TextAppearance_ActionBar_ListsHeader_Selected :

Loading…
Cancel
Save