small fixes
This commit is contained in:
@@ -737,18 +737,17 @@ update msg model =
|
||||
state =
|
||||
model.state
|
||||
|
||||
autoState =
|
||||
model.state.autoComplete
|
||||
-- Recalculate auto-completion results
|
||||
matches =
|
||||
if itemName == "" then
|
||||
[]
|
||||
|
||||
-- For now, merchantLoot *IS* the inventory
|
||||
results =
|
||||
else
|
||||
-- TODO: For now, merchantLoot *IS* the inventory
|
||||
model.state.merchantLoot
|
||||
|> List.filter (\i -> insensitiveContains itemName i.name)
|
||||
in
|
||||
{ model
|
||||
| state =
|
||||
{ state | autoComplete = results }
|
||||
}
|
||||
{ model | state = { state | autoComplete = matches } }
|
||||
-- Update newItem field and erase other (outdated) values
|
||||
|> update (SetNewItem <| Item 0 itemName 0)
|
||||
|
||||
@@ -899,12 +898,9 @@ setError error model =
|
||||
}
|
||||
|
||||
|
||||
|
||||
-- DbUpdates always refer to the active player's loot
|
||||
|
||||
|
||||
applyUpdate : Api.Update -> Model -> Model
|
||||
applyUpdate u model =
|
||||
{- Note: DbUpdates always refer to the active player's loot -}
|
||||
let
|
||||
state =
|
||||
model.state
|
||||
|
||||
Reference in New Issue
Block a user