Skip to content

Commit

Permalink
Remove selected_idxs for settings after saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Athozus committed Jan 1, 2024
1 parent 8d80e4c commit 3eafeb4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ui/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
-- save settings
for setting, _ in pairs(mail.settings) do
local new_value = mail.selected_idxs[setting][playername]
mail.selected_idxs[setting][playername] = nil
if new_value == nil then new_value = mail.get_setting(playername, setting) end
mail.set_setting(playername, setting, new_value)
end
Expand Down

0 comments on commit 3eafeb4

Please sign in to comment.