Fix crash when deleting last item in library (#6079)
Cette révision appartient à :
Parent
aae011ed83
révision
3448751e0e
1 fichiers modifiés avec 3 ajouts et 3 suppressions
|
@ -139,9 +139,9 @@ class LibraryAdapter(
|
|||
}
|
||||
|
||||
override fun getViewType(position: Int): Int {
|
||||
val category = categories[position]
|
||||
return if (isPerCategory && category.id != 0) {
|
||||
if (DisplayModeSetting.fromFlag(category.displayMode) == DisplayModeSetting.LIST) {
|
||||
val category = categories.getOrNull(position)
|
||||
return if (isPerCategory && category?.id != 0) {
|
||||
if (DisplayModeSetting.fromFlag(category?.displayMode) == DisplayModeSetting.LIST) {
|
||||
LIST_DISPLAY_MODE
|
||||
} else {
|
||||
GRID_DISPLAY_MODE
|
||||
|
|
Référencer dans un nouveau ticket