@Override public void clear() { super.clear(); manager.mSelectedStatusIds.clear(); manager.mSelectedUserIds.clear(); manager.onItemsCleared(); }
@Override public boolean remove(final Object object) { final boolean ret = super.remove(object); if (object instanceof ParcelableStatus) { manager.mSelectedStatusIds.remove(((ParcelableStatus) object).id); } else if (object instanceof ParcelableUser) { manager.mSelectedUserIds.remove(((ParcelableUser) object).key); } if (ret) { if (isEmpty()) { manager.onItemsCleared(); } else { manager.onItemUnselected(object); } } return ret; }