Bimba.git

commit 969b5000c3a9641d8af03cae0c63b4995559fa59

Author: Adam <git@apiote.xyz>

show sole stop’s departures only when searching by query

 app/src/main/java/xyz/apiote/bimba/czwek/search/ResultsActivity.kt | 3 


diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/search/ResultsActivity.kt b/app/src/main/java/xyz/apiote/bimba/czwek/search/ResultsActivity.kt
index 96cf5b6e439569eabb825d831bc3c103d2e295c1..26f6d27c18b9b1c61ae2c615927008a6b5b9b77e 100644
--- a/app/src/main/java/xyz/apiote/bimba/czwek/search/ResultsActivity.kt
+++ b/app/src/main/java/xyz/apiote/bimba/czwek/search/ResultsActivity.kt
@@ -189,7 +189,8 @@ 					R.drawable.error_search
 				)
 			)
 		} else {
-			if (queryables.size == 1) {
+			@Suppress("DEPRECATION")  // fixme later getSerializable in API>=33
+			if (queryables.size == 1 && intent.extras?.get("mode") == Mode.MODE_SEARCH) {
 				adapter.click(0)
 			}
 			binding.resultsOverlay.visibility = View.GONE