Fix crash on null quantity when adding an item.
This commit is contained in:
parent
51a477bb58
commit
741bb7cf25
2 changed files with 2 additions and 2 deletions
|
|
@ -65,6 +65,6 @@ class ItemDetailDialogFactory {
|
|||
inventoryId: String?,
|
||||
value: String,
|
||||
): Boolean {
|
||||
return floatChecker.matches(value).not() || (inventoryId == null && value.toFloat() < 1f)
|
||||
return value.isBlank() || floatChecker.matches(value).not() || (inventoryId == null && value.toFloat() < 1f)
|
||||
}
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ class ItemDetailDialogViewModel(
|
|||
characterSheetId = ids?.characterSheetId,
|
||||
items = items,
|
||||
count = selectedInventoryItem?.count ?: 1f,
|
||||
equipped = selectedInventoryItem?.equipped ?: false,
|
||||
equipped = selectedInventoryItem?.equipped == true,
|
||||
inventoryId = ids?.inventoryId,
|
||||
itemId = ids?.itemId,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue