mt-mods / mail

Mail mod for Luanti
https://content.minetest.net/packages/mt-mods/mail/
Other
14 stars 23 forks source link

Message ID mess #135

Closed singularis-mzf closed 9 months ago

singularis-mzf commented 9 months ago

When a single message in inbox is selected and a new message is created, the new message will take an ID of the selected message, which causes multiple kind of wierd behaviour when the new message is sent like:

The cause is this newly added code in mail/ui/compose.lua:

if mail.selected_idxs.message[name] then
    id = mail.selected_idxs.message[name]
end

There is a code in mail.show_compose() that tries to save the id for the message, but if the id parameter is nil (which it is in most of the cases), the original id of the originally selected message is preserved. Maybe to generate a new ID in mail.show_compose() instead of waiting for a callback will help.

BuckarooBanzay commented 9 months ago

I'll try to address this next time i feel like working on this mod, PR's are always open by the way :wink:

Athozus commented 9 months ago

We have problems with message IDs since the last release, I will make an utility to fix the storage, and it will certainly fix many bugs at once. Thanks anyway for reporting :+1: