Bimba.git

commit 1748611f550327386cf3e3d910d2d3e83aa80d9c

Author: Adam Evyčędo <git@apiote.xyz>

show terminus for lines in journeys

 app/src/main/java/xyz/apiote/bimba/czwek/journeys/Journeys.kt | 6 +++-
 app/src/main/res/values-en-rGB/strings.xml | 1 
 app/src/main/res/values-en-rUS/strings.xml | 1 
 app/src/main/res/values/strings.xml | 1 


diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/journeys/Journeys.kt b/app/src/main/java/xyz/apiote/bimba/czwek/journeys/Journeys.kt
index 934696370d4ff426935ed59438aa16de969fa377..d85f73a09eecc1b68607f869251d7d31ef9b4ee2 100644
--- a/app/src/main/java/xyz/apiote/bimba/czwek/journeys/Journeys.kt
+++ b/app/src/main/java/xyz/apiote/bimba/czwek/journeys/Journeys.kt
@@ -88,12 +88,14 @@ 				distance.text = if (it.start.vehicle.Line.name.isBlank() && it.distance != null) {
 					val us = UnitSystem.getSelected(context)
 					us.toString(context, it.distance)
 				} else {
-					// TODO » terminus
-					context.resources.getQuantityString(
+					val headsign = it.start.vehicle.Headsign
+					val stops = context.resources.getQuantityString(
 						R.plurals.number_stops,
 						it.intermediateStops.size + 1,
 						it.intermediateStops.size + 1
 					)
+
+					context.getString(R.string.journey_stops_headsign, stops, headsign)
 				}
 
 				val legDestination = legView.findViewById<TextView>(R.id.leg_destination)




diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3d5a26a73168b2a9779a1887b10bbdd57ab24872..9bec694bb3dd97a67261ef482ea8f5a4d6f38f04 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -316,4 +316,5 @@ 	No journeys found
 	<string name="title_select_date_journey">Select date of the journey</string>
 	<string name="title_select_time_journey">Select journey time</string>
 	<string name="other_options">Other options</string>
+	<string name="journey_stops_headsign">%1$s (» %2$s)</string>
 </resources>




diff --git a/app/src/main/res/values-en-rGB/strings.xml b/app/src/main/res/values-en-rGB/strings.xml
index b2a8a1ff850762b1090d502fcde6467ab4d36137..b31d5c3c8108ce25867ba1a20cfffcc1e190cda1 100644
--- a/app/src/main/res/values-en-rGB/strings.xml
+++ b/app/src/main/res/values-en-rGB/strings.xml
@@ -295,4 +295,5 @@     Depart after
 	<string name="title_select_date_journey">Select date of the journey</string>
 	<string name="title_select_time_journey">Select journey time</string>
 	<string name="other_options">Other options</string>
+	<string name="journey_stops_headsign">%1$s (» %2$s)</string>
 </resources>




diff --git a/app/src/main/res/values-en-rUS/strings.xml b/app/src/main/res/values-en-rUS/strings.xml
index 16dca3dd6974ef527e4fa0a6a052883d8844b5bb..ded95967ed0bc0c3da74faa72b3383675df8b5d7 100644
--- a/app/src/main/res/values-en-rUS/strings.xml
+++ b/app/src/main/res/values-en-rUS/strings.xml
@@ -293,4 +293,5 @@     Depart after
 	<string name="title_select_date_journey">Select date of the journey</string>
 	<string name="title_select_time_journey">Select journey time</string>
 	<string name="other_options">Other options</string>
+	<string name="journey_stops_headsign">%1$s (» %2$s)</string>
 </resources>
\ No newline at end of file