Adds setting to not separate work profile and main profile apps (#678)
* Adds setting to not separate work profile and main profile apps * Only show work profile related preference when there is a work profile --------- Co-authored-by: MM20 <15646950+MM2-0@users.noreply.github.com>
This commit is contained in:
@@ -79,6 +79,7 @@ data class LauncherSettingsData(
|
||||
|
||||
val searchResultsReversed: Boolean = false,
|
||||
val searchResultOrder: SearchResultOrder = SearchResultOrder.Weighted,
|
||||
val separateWorkProfile: Boolean = true,
|
||||
|
||||
val rankingWeightFactor: WeightFactor = WeightFactor.Default,
|
||||
|
||||
|
||||
@@ -62,4 +62,13 @@ class SearchUiSettings internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
val separateWorkProfile
|
||||
get() = launcherDataStore.data.map { it.separateWorkProfile }.distinctUntilChanged()
|
||||
|
||||
fun setSeparateWorkProfile(separateWorkProfile: Boolean) {
|
||||
launcherDataStore.update {
|
||||
it.copy(separateWorkProfile = separateWorkProfile)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user