Skip to content

Commit

Permalink
dont display meal name twice if category and meal have the same name
Browse files Browse the repository at this point in the history
  • Loading branch information
greybaron committed Oct 10, 2024
1 parent 747677f commit 7922dd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/data_backend/stuwe_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ fn mealgroups_to_msg(meal_groups: &[MealGroup], wants_allergens: bool) -> String
// loop over meals in meal group
for sub_meal in &meal_group.sub_meals {
// underlined single or multiple meal name
msg += &format!(" • {}\n", markdown::underline(&sub_meal.name));
if !(meal_group.sub_meals.len() == 1 && sub_meal.name == meal_group.meal_type) {
msg += &format!(" • {}\n", markdown::underline(&sub_meal.name));
}

// loop over ingredients of meal
for ingredient in &sub_meal.additional_ingredients {
Expand Down
2 changes: 0 additions & 2 deletions src/shared_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,11 @@ pub fn make_mensa_keyboard(
&mensa.1
),
)]);
// }
}
InlineKeyboardMarkup::new(keyboard)
}

pub fn make_commands_keyrow() -> KeyboardMarkup {
// let req = ButtonRequest::
let keyboard = vec![
vec![
KeyboardButton::new("/heute"),
Expand Down

0 comments on commit 7922dd4

Please sign in to comment.