Skip to content

Commit

Permalink
Merge pull request EventFahrplan#673 from EventFahrplan/random-housek…
Browse files Browse the repository at this point in the history
…eeping

Random housekeeping
  • Loading branch information
johnjohndoe authored Sep 9, 2024
2 parents ebbffd9 + f54dac2 commit 75b20c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package nerd.tuxmobil.fahrplan.congress.schedule

import android.content.Context
import android.content.res.Resources.NotFoundException
import android.view.View
import android.widget.ImageView
import android.widget.TextView
Expand Down Expand Up @@ -83,7 +84,11 @@ internal class SessionViewDrawer(
} else {
trackNameBackgroundColorDefaultPairs[track] ?: R.color.track_background_default
}
@ColorInt val backgroundColor = ContextCompat.getColor(context, backgroundColorResId)
@ColorInt val backgroundColor = try {
ContextCompat.getColor(context, backgroundColorResId)
} catch (e: NotFoundException) {
throw NotFoundException("Missing color for track \"$track\". Entries in track_resource_names.xml must be present in track_background_* colors.")
}
val sessionDrawable = if (isFavored && isAlternativeHighlightingEnabled()) {
SessionDrawable(
backgroundColor,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package nerd.tuxmobil.fahrplan.congress.schedulestatistic

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
Expand Down Expand Up @@ -110,7 +109,6 @@ private fun NoScheduleStatistic() {
}


@OptIn(ExperimentalFoundationApi::class)
@Composable
private fun ScheduleStatisticList(scheduleStatistic: List<ColumnStatistic>) {
LazyColumn(
Expand All @@ -128,7 +126,7 @@ private fun ScheduleStatisticList(scheduleStatistic: List<ColumnStatistic>) {
ColumnStatisticHeader()
}
items(scheduleStatistic, key = { it.name }) {
ColumnStatisticItem(it, Modifier.animateItemPlacement())
ColumnStatisticItem(it, Modifier.animateItem())
}
}
}
Expand Down

0 comments on commit 75b20c8

Please sign in to comment.