This seems to clear most of the other screen furniture on PC and android. It needs a bit of fine tuning. Didn't bother with a PR as this seems so trivial.
function email.update_hud(player)
local name = player:get_player_name()
local inbox = email.get_inbox(name)
if inbox and #inbox > 0 then
if email.hud:exists(player, "email:text") then
email.hud:change(player, "email:text", "text", #inbox .. " /inbox")
else
email.hud:add(player, "email:icon", {
hud_elem_type = "image",
name = "MailIcon",
position = {x=0.49, y=0.83},
text="email_mail.png",
scale = {x=1,y=1},
alignment = {x=0.5, y=0.5},
})
email.hud:add(player, "email:text", {
hud_elem_type = "text",
name = "MailText",
position = {x=0.48, y=0.85},
text= #inbox .. " /inbox",
scale = {x=1,y=1},
alignment = {x=0.5, y=0.5},
})
end
else
email.hud:remove(player, "email:icon")
email.hud:remove(player, "email:text")
end
end