Skip to content

Commit

Permalink
fixed crash in RegularJourneyContentFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeElementsRuhe committed Jul 10, 2023
1 parent a606c95 commit 3f45368
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,13 @@ class RegularJourneyContentFragment : Fragment() {
textWagonOrder.isGone = buttonWagonOrder.isGone


val lastStation = journeyStops.last()
if(journeyStops.isNotEmpty()) { // empty happens if train is cancelled !!
val lastStation = journeyStops.last()

sev.visibility =
if (SEV_Static.isReplacementStopFrom(lastStation.evaId)) View.VISIBLE else View.GONE
sev.visibility =
if (SEV_Static.isReplacementStopFrom(lastStation.evaId)) View.VISIBLE else View.GONE // default=gone

}

}, {
Log.d(RegularJourneyContentFragment::class.java.simpleName, "Error: $it")
Expand Down

0 comments on commit 3f45368

Please sign in to comment.