Author: Adam Evyčędo <git@apiote.xyz>
prepare responses for release
%!v(PANIC=String method: strings: negative Repeat count)
diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/api/Api.kt b/app/src/main/java/xyz/apiote/bimba/czwek/api/Api.kt index 190d0502524935eb21facd536dafa38ccaadd38a..ce68b7ac246599433119ef2f5aef9f8daf9c0cde 100644 --- a/app/src/main/java/xyz/apiote/bimba/czwek/api/Api.kt +++ b/app/src/main/java/xyz/apiote/bimba/czwek/api/Api.kt @@ -87,11 +87,7 @@ "queryables", null, params, context, - if (server.apiPath == "https://bimba.apiote.xyz/next") { - arrayOf(1u, 2u, 3u, 4u, 0u) - } else { - arrayOf(1u, 2u, 3u, 4u) - }, + arrayOf(1u, 2u, 3u, 4u), null ) } @@ -103,11 +99,7 @@ "queryables", null, mapOf("near" to near.toString()), context, - if (server.apiPath == "https://bimba.apiote.xyz/next") { - arrayOf(1u, 2u, 3u, 4u, 0u) - } else { - arrayOf(1u, 2u, 3u, 4u) - }, + arrayOf(1u, 2u, 3u, 4u), null ) } @@ -165,11 +157,7 @@ "departures", null, params, context, - if (server.apiPath == "https://bimba.apiote.xyz/next") { - arrayOf(1u, 2u, 3u, 4u, 0u) - } else { - arrayOf(1u, 2u, 3u, 4u) - }, + arrayOf(1u, 2u, 3u, 4u), feedID ) } diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Departures.kt b/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Departures.kt index 4e22e00b1b8365b32fc365f86c904dd74366651c..0d053162b88f3d4f2a65975d1d2cff92e2b979a4 100644 --- a/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Departures.kt +++ b/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Departures.kt @@ -19,7 +19,7 @@ companion object { fun unmarshal(stream: InputStream): DeparturesResponse { val reader = Reader(stream) return when (val v = reader.readUInt().toULong()) { - 0UL -> DeparturesResponseDev.unmarshal(stream) + // 0UL -> DeparturesResponseDev.unmarshal(stream) 1UL -> DeparturesResponseV1.unmarshal(stream) 2UL -> DeparturesResponseV2.unmarshal(stream) 3UL -> DeparturesResponseV3.unmarshal(stream) diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Locatables.kt b/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Locatables.kt index 2188e29c3297dc5614ce30f40b4bb359a67781f0..3a42262c3955a75ef6245f6b17e8ceb88f03d429 100644 --- a/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Locatables.kt +++ b/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Locatables.kt @@ -21,7 +21,7 @@ companion object { fun unmarshal(stream: InputStream): LocatablesResponse { val reader = Reader(stream) return when (val v = reader.readUInt().toULong()) { - 0UL -> LocatablesResponseDev.unmarshal(stream) + // 0UL -> LocatablesResponseDev.unmarshal(stream) 1UL -> LocatablesResponseV1.unmarshal(stream) 2UL -> LocatablesResponseV2.unmarshal(stream) 3UL -> LocatablesResponseV3.unmarshal(stream) diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Queryables.kt b/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Queryables.kt index 216ab34e80475121dde939626338c14e59e382cb..8e7cc8f8c7a63204b4c2d69604ae33f2fe4ac768 100644 --- a/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Queryables.kt +++ b/app/src/main/java/xyz/apiote/bimba/czwek/api/responses/Queryables.kt @@ -22,7 +22,7 @@ companion object { fun unmarshal(stream: InputStream): QueryablesResponse { val reader = Reader(stream) return when (val v = reader.readUInt().toULong()) { - 0UL -> QueryablesResponseDev.unmarshal(stream) + // 0UL -> QueryablesResponseDev.unmarshal(stream) 1UL -> QueryablesResponseV1.unmarshal(stream) 2UL -> QueryablesResponseV2.unmarshal(stream) 3UL -> QueryablesResponseV3.unmarshal(stream) diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/departures/DeparturesActivity.kt b/app/src/main/java/xyz/apiote/bimba/czwek/departures/DeparturesActivity.kt index 1de1a44396ad4963b59d1ecb288558a70e60418d..0b725721dcfca87b8b52eaa06e4407b36784c410 100644 --- a/app/src/main/java/xyz/apiote/bimba/czwek/departures/DeparturesActivity.kt +++ b/app/src/main/java/xyz/apiote/bimba/czwek/departures/DeparturesActivity.kt @@ -62,6 +62,8 @@ const val CODE_PARAM = "code" const val NAME_PARAM = "name" const val FEED_PARAM = "feedID" const val LINES_FILTER_PARAM = "linesFilter" + const val LINE_PARAM = "line" + fun getIntent( context: Context, code: String, @@ -341,6 +343,7 @@ } /* TODO elizabeth R.id.terminus_arrival_showing -> { + // TODO get array from R.arrays val options = arrayOf( TERMINUS_ARRIVAL_GREY_OUT, TERMINUS_ARRIVAL_HIDE, @@ -447,7 +450,7 @@ } private fun getLine(): String? { return when (intent?.action) { - null -> intent?.extras?.getString("line") + null -> intent?.extras?.getString(LINE_PARAM) else -> null } }