From 5534fbd617903918aeaf6b5fb5654da16d241f03 Mon Sep 17 00:00:00 2001 From: Krzysztof Sroga Date: Wed, 20 May 2020 18:07:41 +0200 Subject: [PATCH] allow removing sensors from favorites --- .../krzysztofsroga/librehome/viewmodels/SwitchesViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/krzysztofsroga/librehome/viewmodels/SwitchesViewModel.kt b/app/src/main/java/com/krzysztofsroga/librehome/viewmodels/SwitchesViewModel.kt index c45b3ee..48390a0 100644 --- a/app/src/main/java/com/krzysztofsroga/librehome/viewmodels/SwitchesViewModel.kt +++ b/app/src/main/java/com/krzysztofsroga/librehome/viewmodels/SwitchesViewModel.kt @@ -113,7 +113,7 @@ class SwitchesViewModel(application: Application) : AndroidViewModel(application } fun removeFavorite(switch: LhComponent) { - if (switch is LhDevice) { //TODO create fav list for LhGroupScene and for LhSensor + if (switch is LhAbstractDevice) { //TODO create fav list for LhGroupScene and for LhSensor viewModelScope.launch { favoriteDao.delete(FavoriteSwitch(switch.id)) }