app/src/main/java/com/mensa/zhmensa/services/MensaManager.java
/**
     * Adds the current id to the favorite Set.
     * Then iterates through every Mensa and adds the meals that match the menuId as Menus to the favorite Mensa
     * @param menuId The Menu Id that was marked as favorites
     */
Adds the current id to the favorite Set.
Then iterates through every Mensa and adds the meals that match the menuId as Menus to the favorite Mensa
@param menuId The Menu Id that was marked as favorites
Adds the current id to the favorite Set . Then iterates through every Mensa and adds the meals that match the menuId as Menus to the favorite Mensa @param menuId The Menu Id that was marked as favorites
private static void addFavMenuById(String menuId) {
        MenuFilter filter = new MenuIdFilter(menuId);
        favoriteIds.add(menuId);
        for (Mensa mensa : getAllMensasAsCollection()) {
            if(mensa == favoriteMensa)
                continue;
            for (Mensa.Weekday day : Mensa.Weekday.values()) {
                for (Mensa.MenuCategory mealType : Mensa.MenuCategory.values()) {
                    List<IMenu> favMenus = mensa.getMenusForDayAndCategory(day, mealType, filter);
                    List<IMenu> favoriteMenus = new ArrayList<>();
                    for(IMenu menu : favMenus)
                        favoriteMenus.add(new FavoriteMenu(mensa.getDisplayName(), menu, mensa.getUniqueId()));
                    /*for(IMenu menu : favMenus) {
                        if(!Helper.firstNonNull(menu.getName(),"").contains(mensa.getDisplayName()))
                            menu.setName(mensa.getDisplayName() + ": " + menu.getName());
                    }*/
                    favoriteMensa.addMenuForDayAndCategory(day, mealType, favoriteMenus);
                }
            }
            listener.onMensaUpdated(favoriteMensa);
        }
    }
private static void addFavMenuById ( String menuId ) { MenuFilter filter = new MenuIdFilter ( menuId ) ; favoriteIds . add ( menuId ) ; for ( Mensa mensa : getAllMensasAsCollection ( ) ) { if ( mensa == favoriteMensa ) continue ; for ( Mensa . Weekday day : Mensa . Weekday . values ( ) ) { for ( Mensa . MenuCategory mealType : Mensa . MenuCategory . values ( ) ) { List < IMenu > favMenus = mensa . getMenusForDayAndCategory ( day , mealType , filter ) ; List < IMenu > favoriteMenus = new ArrayList < > ( ) ; for ( IMenu menu : favMenus ) favoriteMenus . add ( new FavoriteMenu ( mensa . getDisplayName ( ) , menu , mensa . getUniqueId ( ) ) ) ; /*for(IMenu menu : favMenus) {

                        if(!Helper.firstNonNull(menu.getName(),"").contains(mensa.getDisplayName()))
                            menu.setName(mensa.getDisplayName() + ": " + menu.getName());
                    }*/ favoriteMensa . addMenuForDayAndCategory ( day , mealType , favoriteMenus ) ; } } listener . onMensaUpdated ( favoriteMensa ) ; } }
Adds the current id to the favorite Set.
Adds the current id to the favorite Set .
// Add Menus that match the menuId to the favorite Menu.