Always show all profiles
This commit is contained in:
parent
952225ca12
commit
c3bafb7fb9
@ -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),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -141,8 +141,10 @@ internal data class LauncherApp(
|
||||
options
|
||||
)
|
||||
} catch (e: SecurityException) {
|
||||
Log.e("MM20", "Could not launch app", e)
|
||||
return false
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
Log.e("MM20", "Could not launch app", e)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user