Simplify sorting and make it more readable (#58)

* Simplify sorting and make it more readable

* Make sorter local

* Fix sorters dropdowns go back to default

* Fix luacheck

* Move sorting dropdown values to selected_idxs

* Show previous sorters when going back from message/contacts/...

* Use shallow copy instead of original table

* Open mail interface with previous tab/dropdowns

* Rework mail.sort_messages

* Combine filter and sort, make filtering safe

* Remove checks and logging from sorters

---------

Co-authored-by: Athozus <athozus@gmail.com>
This commit is contained in:
SX 2023-04-10 15:16:23 +03:00 committed by GitHub
parent 0435a0fd21
commit 67bda9a788
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 108 additions and 168 deletions

View file

@ -1,6 +1,6 @@
minetest.register_chatcommand("mail",{
description = "Open the mail interface",
func = function(name)
mail.show_inbox(name, "3", "1", "")
mail.show_mail_menu(name)
end
})