Add ascending/descending, fix selection issue

This commit is contained in:
Athozus 2023-04-05 18:21:01 +02:00
parent 3e2d022c87
commit 618b338295
No known key found for this signature in database
GPG key ID: B50895022E8484BF
5 changed files with 32 additions and 17 deletions

View file

@ -1,11 +1,11 @@
-- helper function for tabbed overview
function mail.show_mail_menu(playername)
function mail.show_mail_menu(playername, sortfield, sortdirection)
local index = mail.selected_idxs.boxtab[playername] or 1
if index == 1 then
mail.show_inbox(playername)
mail.show_inbox(playername, sortfield, sortdirection)
elseif index == 2 then
mail.show_sent(playername)
mail.show_sent(playername, sortfield, sortdirection)
elseif index == 3 then
mail.show_drafts(playername)
end