Skip to content

Commit

Permalink
Small clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
dshokouhi committed Jul 18, 2023
1 parent ba5ce6c commit cf81982
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.homeassistant.companion.android.settings.vehicle.views

import android.os.Build
import android.util.Log
import androidx.annotation.RequiresApi
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxWidth
Expand Down Expand Up @@ -90,7 +89,6 @@ fun AndroidAutoFavoritesSettings(
items(favoriteEntities.size, { favoriteEntities[it] }) { index ->
val favoriteEntityID =
favoriteEntities[index].replace("[", "").replace("]", "").split("-")[1]
Log.d("AAVM", "$favoriteEntityID is found")
androidAutoViewModel.sortedEntities.filter { it.entityId == favoriteEntityID }.let {
ReorderableItem(
reorderableState = reorderState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ class MainVehicleScreen(
.setTint(CarColor.DEFAULT)
.build()
)
setTitle("Favorites")
setTitle(carContext.getString(commonR.string.favorites))
setOnClickListener {
Log.i(TAG, "Favorites clicked: $favoritesList, current server: ${serverId.value}")
screenManager.push(
EntityGridVehicleScreen(
carContext,
serverManager.integrationRepository(serverId.value),
"Favorites",
carContext.getString(commonR.string.favorites),
allEntities.map { it.values.filter { entity -> favoritesList.contains("${serverId.value}-${entity.entityId}") } }
)
)
Expand Down

0 comments on commit cf81982

Please sign in to comment.