mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-15 02:36:39 -04:00
Add (Un)mark spam buttons
Resize boxes view, and modify the layout of message view
This commit is contained in:
parent
48fc8470f5
commit
cd9e9ec8e1
7 changed files with 76 additions and 46 deletions
|
@ -313,6 +313,20 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
|
||||
mail.show_mail_menu(name, sortfieldindex, sortdirection, filter)
|
||||
|
||||
elseif fields.markspam then
|
||||
if formname == "mail:inbox" and mail.selected_idxs.inbox[name] then
|
||||
mail.mark_spam(name, mail.selected_idxs.inbox[name])
|
||||
end
|
||||
|
||||
mail.show_mail_menu(name, sortfieldindex, sortdirection, filter)
|
||||
|
||||
elseif fields.unmarkspam then
|
||||
if formname == "mail:inbox" and mail.selected_idxs.inbox[name] then
|
||||
mail.unmark_spam(name, mail.selected_idxs.inbox[name])
|
||||
end
|
||||
|
||||
mail.show_mail_menu(name, sortfieldindex, sortdirection, filter)
|
||||
|
||||
elseif fields.new then
|
||||
mail.show_compose(name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue