Fix crash
This commit is contained in:
parent
d8f11a04c7
commit
cfbb4e786c
@ -57,7 +57,7 @@ class SearchablePickerVM: ViewModel(), KoinComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getIcon(searchable: SavableSearchable, size: Int): Flow<LauncherIcon> {
|
fun getIcon(searchable: SavableSearchable, size: Int): Flow<LauncherIcon?> {
|
||||||
return iconService.getIcon(searchable, size)
|
return iconService.getIcon(searchable, size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ class CustomizeSearchableSheetVM(
|
|||||||
|
|
||||||
val isIconPickerOpen = mutableStateOf(false)
|
val isIconPickerOpen = mutableStateOf(false)
|
||||||
|
|
||||||
fun getIcon(size: Int): Flow<LauncherIcon> {
|
fun getIcon(size: Int): Flow<LauncherIcon?> {
|
||||||
return iconService.getIcon(searchable, size)
|
return iconService.getIcon(searchable, size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -236,7 +236,7 @@ class GestureSettingsScreenVM : ViewModel(), KoinComponent {
|
|||||||
permissionsManager.requestPermission(context, PermissionGroup.Accessibility)
|
permissionsManager.requestPermission(context, PermissionGroup.Accessibility)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getIcon(searchable: SavableSearchable?, size: Int): Flow<LauncherIcon> {
|
fun getIcon(searchable: SavableSearchable?, size: Int): Flow<LauncherIcon?> {
|
||||||
if (searchable == null) return emptyFlow()
|
if (searchable == null) return emptyFlow()
|
||||||
return iconService.getIcon(searchable, size)
|
return iconService.getIcon(searchable, size)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,7 +55,7 @@ class HiddenItemsSettingsScreenVM : ViewModel(), KoinComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getIcon(searchable: SavableSearchable, size: Int): Flow<LauncherIcon> {
|
fun getIcon(searchable: SavableSearchable, size: Int): Flow<LauncherIcon?> {
|
||||||
return iconService.getIcon(searchable, size)
|
return iconService.getIcon(searchable, size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -221,7 +221,7 @@ class IconsSettingsScreenVM(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getPreviewIcons(size: Int): Flow<List<LauncherIcon>> {
|
fun getPreviewIcons(size: Int): Flow<List<LauncherIcon?>> {
|
||||||
return columnCount.flatMapLatest { cols ->
|
return columnCount.flatMapLatest { cols ->
|
||||||
favoritesService.getFavorites(
|
favoritesService.getFavorites(
|
||||||
includeTypes = listOf(LauncherApp.Domain),
|
includeTypes = listOf(LauncherApp.Domain),
|
||||||
|
|||||||
@ -113,5 +113,5 @@ data class AppListItem(
|
|||||||
val packageName: String,
|
val packageName: String,
|
||||||
val isMusicApp: Boolean,
|
val isMusicApp: Boolean,
|
||||||
val isChecked: Boolean,
|
val isChecked: Boolean,
|
||||||
val icon: Flow<LauncherIcon>,
|
val icon: Flow<LauncherIcon?>,
|
||||||
)
|
)
|
||||||
@ -81,7 +81,7 @@ class EditTagSheetVM : ViewModel(), KoinComponent {
|
|||||||
oldTagName = tagName
|
oldTagName = tagName
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getIcon(item: SavableSearchable, size: Int): Flow<LauncherIcon> {
|
fun getIcon(item: SavableSearchable, size: Int): Flow<LauncherIcon?> {
|
||||||
return iconService.getIcon(item, size)
|
return iconService.getIcon(item, size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -139,7 +139,7 @@ class IconService(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun getIcon(searchable: SavableSearchable, size: Int): Flow<LauncherIcon> {
|
fun getIcon(searchable: SavableSearchable, size: Int): Flow<LauncherIcon?> {
|
||||||
val customIcon = customAttributesRepository.getCustomIcon(searchable)
|
val customIcon = customAttributesRepository.getCustomIcon(searchable)
|
||||||
return combine(iconProviders, transformations, customIcon) { providers, transformations, ci ->
|
return combine(iconProviders, transformations, customIcon) { providers, transformations, ci ->
|
||||||
var icon = cache.get(searchable.key + ci.hashCode())
|
var icon = cache.get(searchable.key + ci.hashCode())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user