@@ -1,6 +1,7 @@
|
||||
package de.mm20.launcher2.badges.providers
|
||||
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.rounded.ContentCopy
|
||||
import androidx.compose.material.icons.rounded.Lock
|
||||
import androidx.compose.material.icons.rounded.Work
|
||||
import de.mm20.launcher2.badges.Badge
|
||||
@@ -33,6 +34,7 @@ class ProfileBadgeProvider : BadgeProvider, KoinComponent {
|
||||
when(it?.type) {
|
||||
Profile.Type.Work -> WorkProfile
|
||||
Profile.Type.Private -> PrivateProfile
|
||||
Profile.Type.Cloned -> ClonedProfile
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
@@ -50,5 +52,9 @@ class ProfileBadgeProvider : BadgeProvider, KoinComponent {
|
||||
private val PrivateProfile = Badge(
|
||||
icon = BadgeIcon(Icons.Rounded.PrivateSpace)
|
||||
)
|
||||
|
||||
private val ClonedProfile = Badge(
|
||||
icon = BadgeIcon(Icons.Rounded.ContentCopy)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -276,6 +276,7 @@ internal class SearchServiceImpl(
|
||||
val standardProfile = profiles.find { it.type == Profile.Type.Personal }
|
||||
val workProfile = profiles.find { it.type == Profile.Type.Work }
|
||||
val privateSpace = profiles.find { it.type == Profile.Type.Private }
|
||||
val clonedProfile = profiles.find { it.type == Profile.Type.Cloned }
|
||||
appRepository.search("", false)
|
||||
.withCustomLabels(customAttributesRepository)
|
||||
.map { apps ->
|
||||
@@ -287,6 +288,9 @@ internal class SearchServiceImpl(
|
||||
standardProfile != null && app.user == standardProfile.userHandle -> standardProfileApps.add(
|
||||
app
|
||||
)
|
||||
clonedProfile != null && app.user == clonedProfile.userHandle -> standardProfileApps.add(
|
||||
app
|
||||
)
|
||||
|
||||
workProfile != null && app.user == workProfile.userHandle -> workProfileApps.add(
|
||||
app
|
||||
|
||||
Reference in New Issue
Block a user