@Override
public ThoughtList doInBackground() throws NotRegisteredException, IOException{
ThoughtList thoughtList = new ThoughtList();
if (webServiceREST.isUserRegistered()){
// get list of favorite thought IDs for current registered user
ListLong favoriteIDs = webServiceREST.getUserFavoriteIDs();
// compare cached thoughts with received thought ids
Set<Long> notFavoriteThoughtsLeft = new HashSet<Long>(cachedFavoriteThought.getMap().keySet());
List<Long> favoriteThoughtsLeft = new ArrayList<Long>();
for(Long id : favoriteIDs.getList()){
if(!cachedFavoriteThought.getMap().containsKey(id)){
favoriteThoughtsLeft.add(id);
}
notFavoriteThoughtsLeft.remove(id);
}