mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-08 07:30:34 -04:00
parent
ec92aaba05
commit
c670d48622
3 changed files with 35 additions and 0 deletions
16
ui/inbox.lua
16
ui/inbox.lua
|
@ -104,5 +104,21 @@ function mail.show_inbox(name, sortfieldindex, sortdirection, filter)
|
|||
else
|
||||
formspec[#formspec + 1] = "]label[2.25,4.5;" .. S("No mail") .. "]"
|
||||
end
|
||||
|
||||
if mail.selected_idxs.inbox[name] and #mail.selected_idxs.inbox[name] > 0 then
|
||||
for i, selected_msg in ipairs(mail.selected_idxs.inbox[name]) do
|
||||
local is_present = false
|
||||
for _, msg in ipairs(messages) do
|
||||
if msg.id == selected_msg then
|
||||
is_present = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not is_present then
|
||||
table.remove(mail.selected_idxs.inbox[name], i)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.show_formspec(name, "mail:inbox", table.concat(formspec, ""))
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue