Message filters/sorters (#56)

* Add sorters for inbox/outbox

* Add ascending/descending, fix selection issue

* Add filters

* Update translations

* Fix UI

* Fix luacheck

* Fix fields disappearing after clicking on tabs/buttons

* Fix luacheck (2)

* Fix first message not sorted correctly
This commit is contained in:
Athozus 2023-04-07 10:19:30 +02:00 committed by GitHub
parent def93bdd0f
commit da05b5d108
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 265 additions and 116 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, filter)
local index = mail.selected_idxs.boxtab[playername] or 1
if index == 1 then
mail.show_inbox(playername)
mail.show_inbox(playername, sortfield, sortdirection, filter)
elseif index == 2 then
mail.show_sent(playername)
mail.show_sent(playername, sortfield, sortdirection, filter)
elseif index == 3 then
mail.show_drafts(playername)
end