Add trash (#100)

* Add trash

* Add break at end of deleting loop

* Show trash tab only when trashing enabled

* Update translations
This commit is contained in:
Athozus 2023-06-15 19:28:04 +02:00 committed by GitHub
parent de07f6b24b
commit 2e106e3df7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 454 additions and 201 deletions

View file

@ -13,8 +13,14 @@ function mail.show_inbox(name, sortfieldindex, sortdirection, filter)
local sortfield = ({"from","subject","time"})[sortfieldindex]
local messages = mail.sort_messages(entry.inbox, sortfield, sortdirection == "2", filter)
local trash_tab = ""
if mail.get_setting(name, "trash_move_enable") then
trash_tab = "," .. S("Trash")
end
local inbox_formspec = "size[8.5,10;]" .. mail.theme .. [[
tabheader[0.3,1;boxtab;]] .. S("Inbox") .. "," .. S("Outbox").. "," .. S("Drafts") .. [[;1;false;false]
tabheader[0.3,1;boxtab;]] ..
S("Inbox") .. "," .. S("Outbox").. "," .. S("Drafts") .. trash_tab .. [[;1;false;false]
button[6,0.10;2.5,0.5;new;]] .. S("New") .. [[]
button[6,0.95;2.5,0.5;read;]] .. S("Read") .. [[]