void updateType(CardState c) { CardTypeView type = c.getType(); if (CardView.this.getCurrentState() == this) { Card card = c.getCard(); if (card != null) { type = type.getTypeWithChanges( card.getChangedCardTypes()); // TODO: find a better way to do this updateRulesText(card.getRules(), type); } } set(TrackableProperty.Type, type); }