From 447ad5e30a129dcbedd939dde48c95302cc1b100 Mon Sep 17 00:00:00 2001 From: Daniel Shokouhi Date: Fri, 28 Jul 2023 10:50:35 -0700 Subject: [PATCH] Show favorites only if selected server has favorites (#3729) --- .../companion/android/vehicle/MainVehicleScreen.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/homeassistant/companion/android/vehicle/MainVehicleScreen.kt b/app/src/main/java/io/homeassistant/companion/android/vehicle/MainVehicleScreen.kt index 797e30fb192..4d5dc3728ba 100644 --- a/app/src/main/java/io/homeassistant/companion/android/vehicle/MainVehicleScreen.kt +++ b/app/src/main/java/io/homeassistant/companion/android/vehicle/MainVehicleScreen.kt @@ -122,7 +122,8 @@ class MainVehicleScreen( setLoading(true) }.build() } - val listBuilder = if (favoritesList.isNotEmpty()) { + val serverHasFavorites = favoritesList.any { it.split("-")[0].toIntOrNull() == serverId.value } + val listBuilder = if (serverHasFavorites) { EntityGridVehicleScreen( carContext, serverManager,