From 8de1732e1b88861fd412125a1e0a4f9630ef9d72 Mon Sep 17 00:00:00 2001 From: MM20 <15646950+MM2-0@users.noreply.github.com> Date: Sun, 11 Aug 2024 22:13:05 +0200 Subject: [PATCH] Remove unused variables --- .../launcher2/ui/launcher/search/SearchColumn.kt | 4 ---- .../de/mm20/launcher2/ui/launcher/search/SearchVM.kt | 12 ------------ 2 files changed, 16 deletions(-) diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchColumn.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchColumn.kt index 926bcfa0..70928ab4 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchColumn.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchColumn.kt @@ -80,10 +80,6 @@ fun SearchColumn( val privateApps by viewModel.privateSpaceAppResults val profiles by viewModel.profiles.collectAsState(emptyList()) val profileStates by viewModel.profileStates.collectAsState(emptyList()) - val workProfile by viewModel.workProfile.collectAsState(null) - val workProfileState by viewModel.workProfileState.collectAsState(null) - val privateProfile by viewModel.privateProfile.collectAsState(null) - val privateProfileState by viewModel.privateProfileState.collectAsState(null) val appShortcuts by viewModel.appShortcutResults val contacts by viewModel.contactResults diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchVM.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchVM.kt index 7a98fb54..e4971b54 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchVM.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/search/SearchVM.kt @@ -91,18 +91,6 @@ class SearchVM : ViewModel(), KoinComponent { it.toList() } } - val workProfile = profiles.map { - it.find { it.type == Profile.Type.Work } - } - val privateProfile = profiles.map { - it.find { it.type == Profile.Type.Private } - } - val workProfileState = workProfile.flatMapLatest { - profileManager.getProfileState(it) - } - val privateProfileState = privateProfile.flatMapLatest { - profileManager.getProfileState(it) - } val hasProfilesPermission = permissionsManager.hasPermission(PermissionGroup.ManageProfiles)