Skip to content

Instantly share code, notes, and snippets.

@MwBakker
Last active November 26, 2018 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MwBakker/958cd48d6196301dd2abeaa4b5243adc to your computer and use it in GitHub Desktop.
Save MwBakker/958cd48d6196301dd2abeaa4b5243adc to your computer and use it in GitHub Desktop.
public Boolean checkNewCat(String catName)
{
this.hasCategory.observe(this.getApplication(), new Observer<Boolean>() {
@Override
public void onChanged(Boolean aBoolean)
{
componentRepository.getComponentCategories().observe(this.getApplication(), new Observer<List<ComponentCat>>() {
@Override
public void onChanged(@Nullable final List<ComponentCat> componentCats)
{
for (ComponentCat cat : componentCats)
{
return !cat.getComponentCatName().equals(catName);
}
}
});
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment