Bimba.git

commit 1c87e0e3236bcbabbcae1b882b026bda183ef5a0

Author: Adam <git@apiote.xyz>

clean up

%!v(PANIC=String method: strings: negative Repeat count)


diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/Bimba.kt b/app/src/main/java/xyz/apiote/bimba/czwek/Bimba.kt
index 34a162856469ff0e7d78c1277a3e48375f4e35e4..f32fbfbb49ce718e677036fbd07d223fb01f1f35 100644
--- a/app/src/main/java/xyz/apiote/bimba/czwek/Bimba.kt
+++ b/app/src/main/java/xyz/apiote/bimba/czwek/Bimba.kt
@@ -3,8 +3,6 @@
 import org.osmdroid.config.Configuration
 import java.io.File
 
-// todo [3.1] style
-
 class Bimba : android.app.Application() {
 	override fun onCreate() {
 		super.onCreate()




diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapFragment.kt b/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapFragment.kt
index b688de9e98fd5a9be8c9e142a98faa029b3c5ca8..00b2d223e7309cbb6c1deb5d1fa1badfce1402d6 100644
--- a/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapFragment.kt
+++ b/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapFragment.kt
@@ -39,8 +39,6 @@ import org.osmdroid.views.overlay.gestures.RotationGestureOverlay
 import org.osmdroid.views.overlay.mylocation.GpsMyLocationProvider
 import org.osmdroid.views.overlay.mylocation.MyLocationNewOverlay
 
-// todo[3.1] empty state on no network
-
 class MapFragment : Fragment() {
 
 	private var maybeBinding: FragmentMapBinding? = null




diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapViewModel.kt b/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapViewModel.kt
index 3a22298fe73acead5ecb23f43b9c171fe5c6deee..8fdef9187436c93e89356801645d296208a733d3 100644
--- a/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapViewModel.kt
+++ b/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapViewModel.kt
@@ -20,7 +20,16 @@ import androidx.lifecycle.viewModelScope
 import com.google.android.material.bottomsheet.BottomSheetDialogFragment
 import kotlinx.coroutines.launch
 import xyz.apiote.bimba.czwek.R
-import xyz.apiote.bimba.czwek.api.*
+import xyz.apiote.bimba.czwek.api.ErrorLocatable
+import xyz.apiote.bimba.czwek.api.ErrorResponse
+import xyz.apiote.bimba.czwek.api.Locatable
+import xyz.apiote.bimba.czwek.api.LocatablesResponse
+import xyz.apiote.bimba.czwek.api.LocatablesResponseDev
+import xyz.apiote.bimba.czwek.api.LocatablesResponseV1
+import xyz.apiote.bimba.czwek.api.PositionV1
+import xyz.apiote.bimba.czwek.api.Server
+import xyz.apiote.bimba.czwek.api.StopV1
+import xyz.apiote.bimba.czwek.api.VehicleV1
 import xyz.apiote.bimba.czwek.departures.DeparturesActivity
 
 class MapViewModel : ViewModel() {
@@ -43,6 +52,7 @@ 					Log.w("Map", "${result.error.statusCode}")
 				}
 				return@launch
 			} else {
+				// fixme NetworkOnMainThreadException
 				_locatables.value = when (val response = LocatablesResponse.unmarshal(result.stream!!)) {
 					is LocatablesResponseDev -> response.locatables
 					is LocatablesResponseV1 -> response.locatables




diff --git a/app/src/main/res/drawable/feeds_cities.xml b/app/src/main/res/drawable/feeds_cities.xml
index 7324708d81054028bfebfd981910557dff919acb..c6b30996be3ec096558260d491ae210f28fbb334 100644
--- a/app/src/main/res/drawable/feeds_cities.xml
+++ b/app/src/main/res/drawable/feeds_cities.xml
@@ -1,4 +1,4 @@
-<vector android:height="24dp" android:tint="#000000"
+<vector android:height="24dp" android:tint="?attr/colorOnSurface"
     android:viewportHeight="24" android:viewportWidth="24"
     android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
     <path android:fillColor="@android:color/white" android:pathData="M15,11L15,5l-3,-3 -3,3v2L3,7v14h18L21,11h-6zM7,19L5,19v-2h2v2zM7,15L5,15v-2h2v2zM7,11L5,11L5,9h2v2zM13,19h-2v-2h2v2zM13,15h-2v-2h2v2zM13,11h-2L11,9h2v2zM13,7h-2L11,5h2v2zM19,19h-2v-2h2v2zM19,15h-2v-2h2v2z"/>




diff --git a/app/src/main/res/drawable/feeds_servers.xml b/app/src/main/res/drawable/feeds_servers.xml
index 4a19b1b7c5a7d45a14c3fe2b89c426917130299b..7332a6e0fc043fff01972e3245d9ce4be7e2feb4 100644
--- a/app/src/main/res/drawable/feeds_servers.xml
+++ b/app/src/main/res/drawable/feeds_servers.xml
@@ -1,4 +1,4 @@
-<vector android:height="24dp" android:tint="#000000"
+<vector android:height="24dp" android:tint="?attr/colorOnSurface"
     android:viewportHeight="24" android:viewportWidth="24"
     android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
     <path android:fillColor="@android:color/white" android:pathData="M20,13H4c-0.55,0 -1,0.45 -1,1v6c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1v-6c0,-0.55 -0.45,-1 -1,-1zM7,19c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM20,3H4c-0.55,0 -1,0.45 -1,1v6c0,0.55 0.45,1 1,1h16c0.55,0 1,-0.45 1,-1V4c0,-0.55 -0.45,-1 -1,-1zM7,9c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z"/>