mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-06 14:40:30 -04:00
Fix luacheck
This commit is contained in:
parent
d821b045a2
commit
2d6a499e64
2 changed files with 16 additions and 6 deletions
11
ui/inbox.lua
11
ui/inbox.lua
|
@ -10,6 +10,9 @@ function mail.show_inbox(name, sortfield, sortdirection, filter)
|
||||||
sortdirection = 1
|
sortdirection = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
sortfield = tostring(sortfield)
|
||||||
|
sortdirection = tostring(sortdirection)
|
||||||
|
|
||||||
if not filter then
|
if not filter then
|
||||||
filter = ""
|
filter = ""
|
||||||
end
|
end
|
||||||
|
@ -30,8 +33,10 @@ function mail.show_inbox(name, sortfield, sortdirection, filter)
|
||||||
button[6,8.7;2.5,0.5;about;]] .. S("About") .. [[]
|
button[6,8.7;2.5,0.5;about;]] .. S("About") .. [[]
|
||||||
button_exit[6,9.5;2.5,0.5;quit;]] .. S("Close") .. [[]
|
button_exit[6,9.5;2.5,0.5;quit;]] .. S("Close") .. [[]
|
||||||
|
|
||||||
dropdown[0,9.4;2,0.5;sortfield;]] .. S("From") .. "," .. S("Subject") .. "," .. S("Date") .. [[;]] .. tostring(sortfield) .. [[;1]
|
dropdown[0,9.4;2,0.5;sortfield;]] ..
|
||||||
dropdown[2.0,9.4;2,0.5;sortdirection;]] .. S("Ascending") .. "," .. S("Descending") .. [[;]] .. tostring(sortdirection) .. [[;1]
|
S("From") .. "," .. S("Subject") .. "," .. S("Date") .. [[;]] .. tostring(sortfield) .. [[;1]
|
||||||
|
dropdown[2.0,9.4;2,0.5;sortdirection;]] ..
|
||||||
|
S("Ascending") .. "," .. S("Descending") .. [[;]] .. tostring(sortdirection) .. [[;1]
|
||||||
field[4.25,9.85;1.4,0.5;filter;]] .. S("Filter") .. [[:;]] .. filter .. [[]
|
field[4.25,9.85;1.4,0.5;filter;]] .. S("Filter") .. [[:;]] .. filter .. [[]
|
||||||
button[5.14,9.52;0.85,0.5;search;Q]
|
button[5.14,9.52;0.85,0.5;search;Q]
|
||||||
|
|
||||||
|
@ -39,7 +44,7 @@ function mail.show_inbox(name, sortfield, sortdirection, filter)
|
||||||
table[0,0.7;5.75,8.35;inbox;#999,]] .. S("From") .. "," .. S("Subject")
|
table[0,0.7;5.75,8.35;inbox;#999,]] .. S("From") .. "," .. S("Subject")
|
||||||
local formspec = { inbox_formspec }
|
local formspec = { inbox_formspec }
|
||||||
local entry = mail.get_storage_entry(name)
|
local entry = mail.get_storage_entry(name)
|
||||||
local messages = mail.sort_messages(mail.filter_messages(entry.inbox, filter), tostring(sortfield), tostring(sortdirection))
|
local messages = mail.sort_messages(mail.filter_messages(entry.inbox, filter), sortfield, sortdirection)
|
||||||
|
|
||||||
mail.message_drafts[name] = nil
|
mail.message_drafts[name] = nil
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ function mail.show_sent(name, sortfield, sortdirection, filter)
|
||||||
sortdirection = 1
|
sortdirection = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
sortfield = tostring(sortfield)
|
||||||
|
sortdirection = tostring(sortdirection)
|
||||||
|
|
||||||
if not filter then
|
if not filter then
|
||||||
filter = ""
|
filter = ""
|
||||||
end
|
end
|
||||||
|
@ -28,9 +31,11 @@ function mail.show_sent(name, sortfield, sortdirection, filter)
|
||||||
button[6,8.7;2.5,0.5;about;]] .. S("About") .. [[]
|
button[6,8.7;2.5,0.5;about;]] .. S("About") .. [[]
|
||||||
button_exit[6,9.5;2.5,0.5;quit;]] .. S("Close") .. [[]
|
button_exit[6,9.5;2.5,0.5;quit;]] .. S("Close") .. [[]
|
||||||
|
|
||||||
dropdown[0,9.4;2,0.5;sortfield;]] .. S("To") .. "," .. S("Subject") .. "," .. S("Date") .. [[;]] .. tostring(sortfield) .. [[;1]
|
dropdown[0,9.4;2,0.5;sortfield;]]
|
||||||
dropdown[2.0,9.4;2,0.5;sortdirection;]] .. S("Ascending") .. "," .. S("Descending") .. [[;]] .. tostring(sortdirection) .. [[;1]
|
.. S("To") .. "," .. S("Subject") .. "," .. S("Date") .. [[;]] .. tostring(sortfield) .. [[;1]
|
||||||
field[4.25,9.85;1.4,0.5;filter;]] .. S("Filter") .. [[:;]] .. filter .. [[]
|
dropdown[2.0,9.4;2,0.5;sortdirection;]]
|
||||||
|
.. S("Ascending") .. "," .. S("Descending") .. [[;]] .. tostring(sortdirection) .. [[;1]
|
||||||
|
field[4.25,9.85;1.4,0.5;filter;]].. S("Filter") .. [[:;]] .. filter .. [[]
|
||||||
button[5.14,9.52;0.85,0.5;search;Q]
|
button[5.14,9.52;0.85,0.5;search;Q]
|
||||||
|
|
||||||
tablecolumns[color;text;text]
|
tablecolumns[color;text;text]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue