Always show all profiles

This commit is contained in:
MM20
2024-07-19 23:02:12 +02:00
parent 952225ca12
commit c3bafb7fb9
3 changed files with 3 additions and 3 deletions
@@ -41,7 +41,6 @@ data class Profile(
data class State(
val locked: Boolean = false,
val hidden: Boolean = false,
)
companion object {
@@ -48,7 +48,7 @@ class ProfileManager(
*/
val activeProfiles: Flow<List<Profile>> = profileStates.map {
it.mapNotNull {
if (it.state.hidden) null else it.profile
if (it.state.locked) null else it.profile
}
}.shareIn(scope, SharingStarted.WhileSubscribed(), replay = 1)
@@ -142,7 +142,6 @@ class ProfileManager(
private fun getProfileState(userHandle: UserHandle): Profile.State {
return Profile.State(
locked = !userManager.isUserUnlocked(userHandle),
hidden = !userManager.isUserRunning(userHandle),
)
}