Canteen items are now individually clickable to signal that they are separate items; BUG: filtering does not work anymore

This commit is contained in:
denizk0461
2023-04-20 10:05:24 +02:00
parent 5d58d25386
commit b9378901f4
5 changed files with 34 additions and 18 deletions
@@ -38,7 +38,8 @@ class CanteenOfferItemAdapter(private val offers: List<CanteenOfferGroup>) : Rec
LayoutInflater.from(holder.binding.root.context),
)
line.content.text = offer.title
line.textContent.text = offer.title
line.textPrice.text = offer.price
val indices = arrayListOf<Int>()
offer.dietaryPreferences.filterIndexed { index, char ->
if (char == 't') {
@@ -127,8 +127,6 @@ class CanteenFragment : Fragment() {
val prefsRegex = getPrefRegex()
val filteredForPreferences = if (prefsRegex.toString() == "ffffffffff") {
// show all elements and skip filtering
this
@@ -139,13 +137,13 @@ class CanteenFragment : Fragment() {
}
}
val a = filteredForPreferences.map {
CanteenOfferGroupElement(
it.title,
it.price,
it.dietaryPreferences,
)
}
// val a = filteredForPreferences.map {
// CanteenOfferGroupElement(
// it.title,
// it.price,
// it.dietaryPreferences,
// )
// }
val b = filteredForPreferences.map { offer ->
CanteenOfferGroup(
offer.date,